]> 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:32:12 +0000 (13:32 +0000)
committerDavid Soria Parra <dsp@php.net>
Tue, 9 Jun 2009 13:32:12 +0000 (13:32 +0000)
The fix was provided by Sriram Natarajan.

sapi/cgi/cgi_main.c

index 3db3ea2d86f350a7aa039c9210be4e074b246798..19299ba94f4603a545b99f2391198d52f1ff0a4b 100644 (file)
@@ -1082,8 +1082,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