Bug #74088 [Opn->Csd]: PATH_INFO is not set using PHP-FPM and mod_proxy_fcgi
| From: | viktor at szepe dot net | Date: | Mon, 20 Feb 2017 19:26:44 +0000 |
| Subject: | Bug #74088 [Opn->Csd]: PATH_INFO is not set using PHP-FPM and mod_proxy_fcgi | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-207473@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74088&edit=1
ID: 74088
User updated by: viktor at szepe dot net
Reported by: viktor at szepe dot net
Summary: PATH_INFO is not set using PHP-FPM and
mod_proxy_fcgi
-Status: Open
+Status: Closed
Type: Bug
Package: FPM related
Operating System: Debian
PHP Version: 5.6.30
Block user comment: N
Private report: N
New Comment:
Thank you.
Previous Comments:
------------------------------------------------------------------------
[2017-02-20 19:07:39] dz at heroku dot com
The issue here is on the Apache side, not in PHP.
Don't use ProxyPassMatch. Use SetHandler.
------------------------------------------------------------------------
[2017-02-12 21:23:28] viktor at szepe dot net
Maybe realted to https://bz.apache.org/bugzilla/show_bug.cgi?id=51517
Especially https://bz.apache.org/bugzilla/show_bug.cgi?id=51517#c21
------------------------------------------------------------------------
[2017-02-12 21:08:48] viktor at szepe dot net
When FilesMatch it works OK.
<FilesMatch ".+\.php$">
SetHandler "proxy:unix:/run/php5-fpm-${SITE_USER}.sock|fcgi://localhost"
</FilesMatch>
------------------------------------------------------------------------
[2017-02-12 19:20:52] viktor at szepe dot net
Description:
------------
mod_fastcgi used to set PATH_INFO properly.
I use mod_proxy_fcgi+FPM through a UDS:
<LocationMatch "^/.+\.php(/.+)?$">
ProxyPassMatch
"unix:///run/php5-fpm-${SITE_USER}.sock|fcgi://localhost${DOCUMENT_ROOT}"
</LocationMatch>
This does not set PATH_INFO.
I have to use the unreliable 'proxy-fcgi-pathinfo' as a word-around.
SetEnvIf Request_URI "^" proxy-fcgi-pathinfo=first-dot
Please consider setting PATH_INFO.
Thank you.
BTW It is ok on PHP 7.0.15
Test script:
---------------
// Navigate to test.php/path-info
var_dump(isset($_SERVER['PATH_INFO']));
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74088&edit=1