]> granicus.if.org Git - php/commitdiff
Fixed bug #47042 (PHP cgi sapi is removing SCRIPT_FILENAME for non apache).
authorDavid Soria Parra <dsp@php.net>
Fri, 9 Jan 2009 22:13:40 +0000 (22:13 +0000)
committerDavid Soria Parra <dsp@php.net>
Fri, 9 Jan 2009 22:13:40 +0000 (22:13 +0000)
sapi/cgi/cgi_main.c

index 16846029b0562a42f98658f013054296c63366d7..6deea3fd0dd565789bc9a85cb350da980a114ea7 100644 (file)
@@ -1062,7 +1062,9 @@ static void init_request_info(TSRMLS_D)
                                TRANSLATE_SLASHES(env_document_root);
                        }
 
-                       if (env_path_translated != NULL && env_redirect_url != NULL) {
+                       if (env_path_translated != NULL && env_redirect_url != NULL &&
+                           orig_script_filename != NULL && script_path_translated != NULL &&
+                           strcmp(orig_script_filename, script_path_translated) != 0) {
                                /*
                                   pretty much apache specific.  If we have a redirect_url
                                   then our script_filename and script_name point to the