Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix Apache 2.4.10+ SetHandler proxy:fcgi:// incompatibilities #694
Apache 2.4.10+ will allow the following:
This is much easier than using
It's basically the future of using Apache (via
However, the two bits of code this commit deletes interfere with that. They both cover CGI-only mode and were copied from that SAPI into the FPM source. See e.g. https://bugs.php.net/bug.php?id=47042
The first deleted part mangled
is used (i.e. rewriting to
Clearly, neither applies in the case of FastCGI, so both are safe to delete.
Thanks for the merge @Tyrael but this addresses a different issue than bug 65641. That one is still unaddressed and should be re-opened.
The NEWS entry for this PR should be something like "Support Apache 2.4.10+ SetHandler method for mod_proxy_fcgi and PHP-FPM".
So others can verify my findings I've posted my test script at https://gist.github.com/pbowyer/bba54cbf01cf6b250c71.
Under PHP 5.6.0RC2:
Under all previous versions of PHP (tested 5.5.10 and 5.3.28):
I would love to see this backported as far as PHP 5.3. If not I'm going to have to manually patch it.
This was referenced
Aug 9, 2014
It still doesn't work well according to Apache documentation. It adds an additional trailing slash (/) at the beginning of SCRIPT_FILENAME if SetHandler ends with a trailing slash like in http://httpd.apache.org/docs/current/mod/mod_proxy.html#handler:
The following one has no problems, of course:
So, currently we still have the following problem: https://bugs.php.net/bug.php?id=67998
I'm still running into some issues with mod_proxy_fcgi, sockets, SetHandler and mod_rewrite:
If I request
But if I don't specify
I also tested with mod_php, and then the rewriting works fine and whether or not I add
@fkooman This is probably not the right place for extended discussion, but the patch we made in 2.4.21 to fix other FCGI backends with mod_proxy_fcgi broke the detection code @dzuelke was messing with in this series of patches.
See apache/httpd@cab0bfb#commitcomment-20393588 and https://bz.apache.org/bugzilla/show_bug.cgi?id=59618 . We've written ourselves into a mutually dependent corner here and I'm trying to see if there's a way back out.
@dzuelke Yes. 2.4.26 won't release without a reversion unless my showstopper gets vetoed, and trunk contains a patch from @covener to hide these changes behind a (non-default) configuration directive.
As for my plan forward (which is not guaranteed to be the plan forward):
Just those two alone will require a pretty good conversation. Is there a better place than your mailing list to have it?
Just a FYI that discussions on the Apache dev side are occurring on: https://lists.apache.org/thread.html/d0f05cc71deb69ea472520fb655ca7504fec90850614f5680b42587a@%3Cdev.httpd.apache.org%3E