summaryrefslogtreecommitdiff
path: root/sapi/cgi/cgi_main.c
diff options
context:
space:
mode:
authorDavid Soria Parra <dsp@php.net>2009-06-09 13:29:39 +0000
committerDavid Soria Parra <dsp@php.net>2009-06-09 13:29:39 +0000
commitc52581d95e85028c99101387a0f3fd586ece4101 (patch)
treea6375d5d0ef46751cb457adc08ed3499ccd83a0f /sapi/cgi/cgi_main.c
parent8d699be646833c776f19ab418c4a3a9591c41302 (diff)
downloadphp-git-c52581d95e85028c99101387a0f3fd586ece4101.tar.gz
Fix bug #47042 (cgi sapi is incorrectly removing the SCRIPT_FILENAME for non apache).
The fix was provided by Sriram Natarajan.
Diffstat (limited to 'sapi/cgi/cgi_main.c')
-rw-r--r--sapi/cgi/cgi_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index 8bcc46b96e..dff71ec5d4 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -964,7 +964,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