From: Christian Weiske Date: Tue, 8 Jul 2014 16:59:30 +0000 (+0200) Subject: Fix bug #67587: Redirection loop on nginx with FPM X-Git-Tag: PRE_PHPNG_MERGE~106^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e76d3cba96dc2297fdb3b4e47b9a923f8fc2913d;p=php Fix bug #67587: Redirection loop on nginx with FPM Redirection will work correctly as long as PATH_INFO is available, e.g. via the following nginx configuration: set $path_info $fastcgi_path_info; fastcgi_param PATH_INFO $path_info; --- diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 75aadfbc54..b198bc2fd1 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -606,6 +606,7 @@ PHP_METHOD(Phar, webPhar) } if ((strlen(sapi_module.name) == sizeof("cgi-fcgi")-1 && !strncmp(sapi_module.name, "cgi-fcgi", sizeof("cgi-fcgi")-1)) + || (strlen(sapi_module.name) == sizeof("fpm-fcgi")-1 && !strncmp(sapi_module.name, "fpm-fcgi", sizeof("fpm-fcgi")-1)) || (strlen(sapi_module.name) == sizeof("cgi")-1 && !strncmp(sapi_module.name, "cgi", sizeof("cgi")-1))) { if (PG(http_globals)[TRACK_VARS_SERVER]) {