Fixing Apache mod_proxy_fcgi SCRIPT_FILENAME et al for good

php.internals

David Zuelke

9 years ago
Hi all, https://github.com/php/php-src/pull/694 and https://github.com/php/php-src/pull/765 brought support for Apache's "SetHandler" based mod_proxy_fcgi-to-FPM interface. Recently, a change in Apache (https://github.com/apache/httpd/commit/cab0bfbb2645bb8f689535e5e2834e2dbc23f5a5) broke this again, so FPM no longer works with Apache 2.4.23 and later. The HTTPD developers are interested in fixing this once and for all, by cleaning up several inconsistencies on their side in one go. However, that would require accompanying changes on the PHP side in all of the FPM and FCGI SAPI's detection logic, and that needs coordinating :) What's the right place for this discussion? Would somebody with the right karma/experience be willing to sign up to https://httpd.apache.org/lists.html#http-dev and join in? Or does a GitHub issue or PR suffice? David P.S. obviously, the 5.6 active support EOL timing isn't ideal for such a change, but we can cross that bridge when we get there ;)

Remi Collet

9 years ago
Le 17/01/2017 à 15:44, David Zuelke a écrit :
> Hi all, > > https://github.com/php/php-src/pull/694 and https://github.com/php/php-src/pull/765 brought support for Apache's "SetHandler" based mod_proxy_fcgi-to-FPM interface. > > Recently, a change in Apache (https://github.com/apache/httpd/commit/cab0bfbb2645bb8f689535e5e2834e2dbc23f5a5) broke this again, so FPM no longer works with Apache 2.4.23 and later. > > The HTTPD developers are interested in fixing this once and for all, by cleaning up several inconsistencies on their side in one go. However, that would require accompanying changes on the PHP side in all of the FPM and FCGI SAPI's detection logic, and that needs coordinating :) > > What's the right place for this discussion? Would somebody with the right karma/experience be willing to sign up to https://httpd.apache.org/lists.html#http-dev and join in? Or does a GitHub issue or PR suffice?
Can you please describe how this is broken, Which config / url, with expected / actual results ? Remi P.S. I'm running apache 2.4.25 and php-fpm without (noticed issue)

David Zuelke

9 years ago
> On 17.01.2017, at 15:58, Remi Collet <remi@fedoraproject.org> wrote: > > Le 17/01/2017 à 15:44, David Zuelke a écrit : >> Hi all, >> >> https://github.com/php/php-src/pull/694 and https://github.com/php/php-src/pull/765 brought support for Apache's "SetHandler" based mod_proxy_fcgi-to-FPM interface. >> >> Recently, a change in Apache (https://github.com/apache/httpd/commit/cab0bfbb2645bb8f689535e5e2834e2dbc23f5a5) broke this again, so FPM no longer works with Apache 2.4.23 and later. >> >> The HTTPD developers are interested in fixing this once and for all, by cleaning up several inconsistencies on their side in one go. However, that would require accompanying changes on the PHP side in all of the FPM and FCGI SAPI's detection logic, and that needs coordinating :) >> >> What's the right place for this discussion? Would somebody with the right karma/experience be willing to sign up to https://httpd.apache.org/lists.html#http-dev and join in? Or does a GitHub issue or PR suffice? > > Can you please describe how this is broken, > Which config / url, with expected / actual results ?
See https://github.com/php/php-src/pull/694#issuecomment-267183973 ff and https://github.com/apache/httpd/commit/cab0bfbb2645bb8f689535e5e2834e2dbc23f5a5#commitcomment-20393588 ff I should point out that right now, this does not require action on the PHP side, as the change will be reverted for the next Apache release; I started this discussion to address the fact that Apache and PHP/FPM are mutually depending on specific magic/workarounds, which is not easy to solve without some coordination :)
> P.S. I'm running apache 2.4.25 and php-fpm without (noticed issue)
Are you using SetHandler, or another method? SetHandler is the only one that universally works with arbitrary .htaccess rewrites etc, unlike ProxyPass. The issue also only arises when rewriting to e.g. an index.php David

Jacob Champion

9 years ago
On 01/17/2017 06:44 AM, David Zuelke wrote:
> What's the right place for this discussion? Would somebody with the > right karma/experience be willing to sign up to > https://httpd.apache.org/lists.html#http-dev and join in? Or does a > GitHub issue or PR suffice?
Bump. I'm one of the httpd committers trying to drive this particular conversation -- is there anyone interested in following this from the PHP side? Don't get me wrong; we have a lot to fix before you can take any final action, but we won't be able to turn on the new fixes at all without some involvement from PHP. (And it would probably be more helpful to you to provide feedback as we work, rather than dumping yet another httpd functional change on PHP-FPM and saying "here you go, deal with it".) --Jacob

Jacob Champion

9 years ago
On 01/25/2017 01:16 PM, Jacob Champion wrote:
> rather than dumping yet another httpd > functional change on PHP-FPM and saying "here you go, deal with it"
("rather than *us* dumping", I should have said.) This was a confusing way for me to communicate "I don't want to just push breaking changes on you without your involvement". --Jacob