summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Soria Parra <dsp@php.net>2009-01-09 22:13:55 +0000
committerDavid Soria Parra <dsp@php.net>2009-01-09 22:13:55 +0000
commit544150aef8903bbde91fa0c260c9fe6ee256f10b (patch)
treef741e6529b438dfb2b2abfcb0abbfde97110fda3
parenta4d6ab1376c5e5c91209cc7ceeb19cffc8a910d9 (diff)
downloadphp-git-544150aef8903bbde91fa0c260c9fe6ee256f10b.tar.gz
MFH: Fixed bug #47042 (PHP cgi sapi is removing SCRIPT_FILENAME for non apache).
-rw-r--r--sapi/cgi/cgi_main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index 4d40499f2b..d5fd29c430 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -1064,7 +1064,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