Forum

405 error with Yii Framework

Kurt
19 January 2010, 13:17


Hiawatha version: 6.19
Operating System: Arch Linux 64 bit

I'm getting a 405 (Method not allowed) error when I use the sample hangman game provided with the Yii framework (as well as other samples).

the only Hiawatha log entry is in the "access log" as follows:

"127.0.0.1|Tue 19 Jan 2010 04:05:50 -0800|405|604||POST /demos/hangman/index.php/game/guess/D HTTP/1.1|Host: yii|User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100105 Firefox/3.5.7|Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8|Accept-Language: en-us,en;q=0.5|Accept-Encoding: gzip,deflate|Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7|Keep-Alive: 300|Connection: keep-alive|Referer: http://yii/demos/hangman/|Content-Type: application/x-www-form-urlencoded|Content-Length: 193"

Any reason why Hiawatha doesn't like this Post?
Hugo Leisink
19 January 2010, 13:28
Because /demos/hangman/index.php/game/guess/D is not a CGI appliction. POST requests can only be done to a CGI application.

/demos/hangman/index.php is a CGI application though. But for Hiawatha to search for a CGI application inside an URL, you have to switch on PathInfo. Use the following setting and try again.
VirtualHost {
...
EnablePathInfo = yes
}
Kurt
19 January 2010, 23:20
Thanks Hugo. The app is now functioning perfectly!
That's a subtle distinction that I never would have understood if I didn't use Hiawatha.

Great little web-server... if I were just smart enough to utilize it
This topic has been closed.