From: David Soria Parra Date: Tue, 9 Jun 2009 13:29:39 +0000 (+0000) Subject: Fix bug #47042 (cgi sapi is incorrectly removing the SCRIPT_FILENAME for non apache). X-Git-Tag: php-5.2.10RC2~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c52581d95e85028c99101387a0f3fd586ece4101;p=php Fix bug #47042 (cgi sapi is incorrectly removing the SCRIPT_FILENAME for non apache). The fix was provided by Sriram Natarajan. --- diff --git a/NEWS b/NEWS index 209550208e..d5845220d2 100644 --- a/NEWS +++ b/NEWS @@ -34,6 +34,8 @@ (Nuno, Scott) - Fixed bug #42143 (The constant NAN is reported as 0 on Windows) (Kanwaljeet Singla, Venkat Raman Don) +- Fixed bug #47042 (cgi sapi is incorrectly removing SCRIPT_FILENAME). + (Sriram Natarajan, David Soria Parra) 27 May 2009, PHP 5.2.10RC1 diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 8bcc46b96e..dff71ec5d4 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -964,7 +964,8 @@ static void init_request_info(TSRMLS_D) } if (env_path_translated != NULL && env_redirect_url != NULL && - orig_script_filename != NULL && script_path_translated != NULL) { + env_path_translated != script_path_translated && + strcmp(env_path_translated, script_path_translated) != 0) { /* pretty much apache specific. If we have a redirect_url then our script_filename and script_name point to the