From: David Soria Parra Date: Tue, 9 Jun 2009 13:32:12 +0000 (+0000) Subject: Fix bug #47042 (cgi sapi is incorrectly removing the SCRIPT_FILENAME for non apache). X-Git-Tag: php-5.4.0alpha1~191^2~3375 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=21d5bbcb7a210cabc8b7724a09520f694e667636;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/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 3db3ea2d86..19299ba94f 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -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