From: David Soria Parra Date: Fri, 9 Jan 2009 22:13:40 +0000 (+0000) Subject: Fixed bug #47042 (PHP cgi sapi is removing SCRIPT_FILENAME for non apache). X-Git-Tag: php-5.4.0alpha1~191^2~4574 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4edee64c6c819ec46645dffd6f8f80c421f9db5c;p=php Fixed bug #47042 (PHP cgi sapi is removing SCRIPT_FILENAME for non apache). --- diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 16846029b0..6deea3fd0d 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -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