From: sriram dot natarajan at sun dot com Operating system: linux , solaris PHP version: 5.2.8 PHP Bug Type: *Web Server problem Bug description: php cgi sapi is incorrectly removing the SCRIPT_FILENAME for non apache
Description: ------------ currently, php cgi sapi code checks for redirect url and env_path_translated to determine if the request is coming from apache web server and accordingly modifies the CGI environment variables so that server can continue processing. however, this check is insufficient considering that any web server exporting SCRIPT_FILENAME and REDIRECT_URL with some value will be hit by the apache specific processing. Reproduce code: --------------- if (env_path_translated != NULL && env_redirect_url != NULL) { /* pretty much apache specific. If we have a redirect_url then our script_filename and script_name point to the php executable */ script_path_translated = env_path_translated; /* we correct SCRIPT_NAME now in case we don't have PATH_INFO */ env_script_name = env_redirect_url; } Expected result: ---------------- server should continue processing Actual result: -------------- no input file is returned -- Edit bug report at http://bugs.php.net/?id=47042&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47042&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47042&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47042&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47042&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47042&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47042&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47042&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47042&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47042&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47042&r=support Expected behavior: http://bugs.php.net/fix.php?id=47042&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47042&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47042&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47042&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47042&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=47042&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47042&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47042&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47042&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47042&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47042&r=mysqlcfg