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.”







Great tip! Fixed my issue! Thanks you very much. Oh mod_rewrite how I hate thee….
Adding that little question mark fixed my file as well! However, I know thecity.org has removed index.php, but they don’t have a ? in their .htaccess file. So, whatever, hopefully there will be no negative effects.
Whether you need the ? will depend on your web host. For sites I’d done I didn’t originally need it either, but then my host made some configuration changes after which I did need to do it.
Worked!
thanx a lot mate
Thank you!!! Saved me a ton of time!
Thank you so much for this post. Solved my problem easily. I couldn’t figure out what was going on as I had all my settings correct according to the host.
PS - small typo:
should read
Hi Philip, thanks for pointing that out.
For anyone who might be using CodeIgniter with mod_rewrite on Fasthosts web hosting in the UK, the question mark tip fixes the problem!
You’ve saved me hours John, thank you!
No problem.
Thanks for this, much appreciated!
Thanks a lot
solved my problem