From: Greg Beaver Date: Sat, 22 Mar 2008 22:04:21 +0000 (+0000) Subject: fix all frontcontroller tests - cgi sapi was not being detected, only fastcgi X-Git-Tag: RELEASE_2_0_0a1~37 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1b05ce68d7e5844c7110819941afcfce5079ff9e;p=php fix all frontcontroller tests - cgi sapi was not being detected, only fastcgi --- diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 35bcd81375..8fa3579500 100755 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -537,7 +537,8 @@ PHP_METHOD(Phar, webPhar) basename++; } - if (strlen(sapi_module.name) == sizeof("cgi-fcgi")-1 && !strncmp(sapi_module.name, "cgi-fcgi", sizeof("cgi-fcgi")-1)) { + if ((strlen(sapi_module.name) == sizeof("cgi-fcgi")-1 && !strncmp(sapi_module.name, "cgi-fcgi", sizeof("cgi-fcgi")-1)) + || (strlen(sapi_module.name) == sizeof("cgi")-1 && !strncmp(sapi_module.name, "cgi", sizeof("cgi")-1))) { char *testit; testit = sapi_getenv("SCRIPT_NAME", sizeof("SCRIPT_NAME")-1 TSRMLS_CC);