From 4edee64c6c819ec46645dffd6f8f80c421f9db5c Mon Sep 17 00:00:00 2001 From: David Soria Parra Date: Fri, 9 Jan 2009 22:13:40 +0000 Subject: [PATCH] Fixed bug #47042 (PHP cgi sapi is removing SCRIPT_FILENAME for non apache). --- sapi/cgi/cgi_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.50.1