httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Montague <>
Subject Re: mod_proxy_fcgi issues
Date Thu, 04 Dec 2014 20:38:23 GMT
On 2014-12-04 13:27, Eric Covener wrote:
> On Thu, Dec 4, 2014 at 1:11 PM, Jim Riggs <> wrote:
>> This all may certainly be true, but I just for clarity's sake (since it was my quote
that started this new mod_proxy_fcgi thread), my mod_proxy_balancer -> mod_proxy_fcgi ->
php-fpm issue is NOT an httpd least that is not how I have treated it. It is actually
a code fix I have had to make in PHP to get it to work.
> [...] It doesn't seem that usable values for these things should be so unique to php-fpm.

My experience has been that the PHP FPM SAPI function 
init_request_info() in sapi/fpm/fpm/fpm_main.c, which I think was 
originally copied from the CGI SAPI, is very old code that goes to great 
lengths to preserve old, not always standards-compliant behavior in 
order to avoid breaking backward compatibilities. Hence, I'm not 
convinced that the things Eric refers to above might not be unique to 

After struggling to get php-fpm working with mod_proxy_fcgi, I 
eventually completely rewrote the whole init_request_info function the 
way I thought it "should be" without any regards to backwards 
compatibility; this solved the problems I was having.

If memory serves (it's been a few years) the main problems I was 
encountering were with serving the index file for directories and 
correct handling of PATH_INFO.

I've attached the patch I'm using (a completely new version of the 
init_request_info function) in case anyone wants to either play with it 
or compare it to the code that PHP currently uses.

   Mark Montague

View raw message