Due to a really lame hack in PHP (when used as a FastCGI provider) to detect whether the HTTP front-end is Apache, PHP behaved really, really badly when used with non-Apache servers if the HTTP server provided both REQUEST_URI and SCRIPT_FILENAME. The end result was that PHP would throw "No input file specified" errors inappropriately. The only fix was to set cgi.fix_pathinfo Off in the php.ini file if your app did not use PathInfo, and to set it to On if your app DID use PathInfo (though setting it to On did not fix a problem with your app being invoked via an "invisible" file like an index.php).
Thankfully the patch provided by Sriram in the bug has now been accepted into PHP. It will (supposedly) make it into PHP 5.2.10, 5.3, and 6.0. If you need the fix in an earlier version, the patch is only two lines and can be easily applied.
Post new comment