Skip to content

Tyssen Design — Brisbane Tyssen Design logo

[email protected] (07) 3300 3303

‘No input file specified’ problem

By /

If you've installed ExpressionEngine but find you get a 'No input file specified' error message on anything but the home page of the site, chances are it's because your server doesn't support the path_info server variable.

This happened to me recently when my web host migrated my accounts to a new server and in the process made some configuration changes, one of which involved disabling path_info.

According to the ExpressionEngine Knowledge Base, there are a couple of options available to you if this is the case with your server:

  • You can turn on the 'Force Query String' setting in the ExpressionEngine control panel, found at Admin | System Preferences | Output and Debugging Preferences. This of course means that all your URLs will have a query string in them and look something like www.example.com/?/filename/.

  • Or you can edit your index.php and replace:

    $path_info = (isset($_SERVER['PATH_INFO'])) ? $_SERVER['PATH_INFO'] : @getenv('PATH_INFO');

    with

    $path_info = (isset($_SERVER['ORIG_PATH_INFO'])) ? $_SERVER['ORIG_PATH_INFO'] : @getenv('ORIG_PATH_INFO');

So essentially, just replacing PATH_INFO with ORIG_PATH_INFO.

In my case, however, this wasn't quite enough and as I didn't find any mention of this important little fact anywhere, I thought it was worth mentioning here. The reason the workarounds weren't working was because I was also using a .htaccess file to remove index.php from the URL:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]

What was missing was the ? from the rewrite rule, so the last line should look like: RewriteRule ^(.*)$ /index.php?/$1 [L]

As one of the technical support guys at my host said, "It's always the little things that cause the most trouble.";)

Like to say hello? Give us a call on (07) 3300 3303, send us an email to enquiries@tyssendesign.com.au, or a message by filling in the form below.