php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74088 PATH_INFO is not set using PHP-FPM and mod_proxy_fcgi
Submitted: 2017-02-12 19:20 UTC Modified: 2017-02-20 19:34 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: viktor at szepe dot net Assigned:
Status: Not a bug Package: FPM related
PHP Version: 5.6.30 OS: Debian
Private report: No CVE-ID: None
 [2017-02-12 19:20 UTC] 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']));



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-02-12 21:08 UTC] 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 21:23 UTC] 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-20 19:07 UTC] dz at heroku dot com
The issue here is on the Apache side, not in PHP.

Don't use ProxyPassMatch. Use SetHandler.
 [2017-02-20 19:26 UTC] viktor at szepe dot net
-Status: Open +Status: Closed
 [2017-02-20 19:26 UTC] viktor at szepe dot net
Thank you.
 [2017-02-20 19:34 UTC] requinix@php.net
-Status: Closed +Status: Not a bug
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC