Skip to content

Conversation

haught
Copy link

@haught haught commented Mar 25, 2015

mod_proxy_balancer uses proxy:balancer:// instead of proxy:fcgi:// for its prefix. This patch simply adds support for this prefix based off of proxy:fcgi.

@smalyshev smalyshev added the Bug label Apr 1, 2015
@haught
Copy link
Author

haught commented Apr 23, 2015

So it appears that recent versions of apache (just upgraded) have removed the prefix ( apache/httpd@01d1fce ), but I am still having to ignore anything after a ? in the env_script_filename, but now just outside the if statements referenced in the patch.

char *p = strchr(env_script_filename, '?');
if (p) {
*p =0;
}

Without this somewhere, having a query string causes the file to not be found. Would this cause any problems with other web servers?

… setup

And change ignoring a query string in env_script_filename for Apache
@haught
Copy link
Author

haught commented Apr 23, 2015

I made an change in haught@642de27 to still work with older Apache versions that use the prefixes, but now it will remove the query string from env_script_filename for any request from Apache rather then just if proxy:balancer:// or proxy:fcgi:// is detected.

@remicollet
Copy link
Member

This PR seems useful for old Apache version (ex 2.4.6 on RHEL-7)

But I'm a bit reluctant with the

 strncmp(env_server_software, "Apache", sizeof("Apache") - 1) == 0) {

I'm afraid of unexpected changes...
Have you use case where it is needed ? (outside of FPM)

Will prefer to really restreint this piece of code for proxy part (apache_was_here==1)

@php-pulls
Copy link

Comment on behalf of remi at php.net:

see http://git.php.net/?p=php-src.git;a=commit;h=07d2dcdf09fcfbd617031bd341384efb236de12c

@php-pulls php-pulls closed this Jan 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants