Previous

Next

CssMySite

'No input file specified Error ' with Kohana and .htaccess

30 Jan, 2009

labels:

After installing Kohana v2.3 and following these instructions to remove index.php from the URL, a blank page with "No input file specified." is displayed.

The problem is some web hosting companies run PHP5 on Apache 2.2 as CGI mode as the default. If they do, Apache is not going to support 'PATH_INFO' inside Kohana. I found my information here although I had to rework the RewriteRule for Kohana 2.3.

To fix this, for Kohana 2.2.1 and earlier replace the last line in the .htaccess file with

RewriteRule ^(.+)$ index.php?/$1 [L]

Later versions need to use

RewriteRule ^(.+)$ index.php?kohana_uri=$1 [L]

For Kohana version 3.0 see my other post