]> granicus.if.org Git - php/commitdiff
Fix bug #47042 (cgi sapi is incorrectly removing the SCRIPT_FILENAME for non apache).
authorDavid Soria Parra <dsp@php.net>
Tue, 9 Jun 2009 13:29:39 +0000 (13:29 +0000)
committerDavid Soria Parra <dsp@php.net>
Tue, 9 Jun 2009 13:29:39 +0000 (13:29 +0000)
The fix was provided by Sriram Natarajan.

NEWS
sapi/cgi/cgi_main.c

diff --git a/NEWS b/NEWS
index 209550208e81a3e7da30e7fcc98edf232a6d8d62..d5845220d237e7f22f6a4eef65b514d843f1b5dd 100644 (file)
--- 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
index 8bcc46b96effc8ac253cdd5586f8129d35ef8ca6..dff71ec5d43fedc8b69d8f3b0db23e2abba8c112 100644 (file)
@@ -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