Re: Fixing (and making easier) Apache mod_proxy_fcgi with PHP-FPM
| From: | David Zuelke | Date: | Thu, 26 Jun 2014 19:12:31 +0000 |
| Subject: | Re: Fixing (and making easier) Apache mod_proxy_fcgi with PHP-FPM | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-75104@lists.php.net to get a copy of this message | ||
On 26.06.2014, at 11:19, Julien Pauli <jpauli@php.net> wrote:
> On Thu, Jun 26, 2014 at 7:49 PM, Stas Malyshev <smalyshev@sugarcrm.com> wrote:
>> Hi!
>>
>>> ops, sorry I have missinterpreted your previous mail.
>>> having it in 5.4 would of course better.
>>>
>>> Stas are you ok with merging this to PHP-5.4 now?
>>
>> I'm ok with it. Did you ping Jerome Loyet or Antony? They are listed as
>> maintainers, haven't heard from them on that.
>
> As Pierre said : are we absolutely sure about this patch ?
>
> History shows that we once failed at patching FPM and introduced problems.
That's what RCs are for, right? :)
It's a relatively straightforward change, and you can see from a look at http://github.com/php/php-src/pull/694 and https://github.com/dzuelke/php-src/blob/apache_fcgi_sethandler/sapi/cgi/cgi_main.c#L1205
that the code that the change removes was simply a verbatim copy from the old CGI code that
didn't get cleaned up during the "translation" to FPM.
In a FastCGI environment, SCRIPT_FILENAME and SCRIPT_NAME cannot contain the name of the PHP
executable, as that's not known or invoked by the web server, so the code is completely
redundant.
CCing Antony so he can confirm/approve.
David
P.S. Just to emphasize this again: we're running this in production for all PHP customers now
with zero issues, running a standard FPM config and the usual Apache config; tested with
ProxyPassMatch, mod_rewrite and the new (Apache 2.4.10) SetHandler way of connecting the two. The
first two suffer from https://bugs.php.net/bug.php?id=65641, so that
should be addressed too, eventually.