Bug #70757 [Com]: $_SERVER["PHP_SELF"] is malformed with PHP-FPM and Apache 2.4.17

From: Date: Thu, 22 Oct 2015 16:13:57 +0000
Subject: Bug #70757 [Com]: $_SERVER["PHP_SELF"] is malformed with PHP-FPM and Apache 2.4.17
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-196750@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70757&edit=1 ID: 70757 Comment by: fullermd+php at over-yonder dot net Reported by: admin at franceserv dot fr Summary: $_SERVER["PHP_SELF"] is malformed with PHP-FPM and Apache 2.4.17 Status: Open Type: Bug Package: *Directory/Filesystem functions Operating System: Linux Debian PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Note that it also includes the query string (if any), as well as the scheme/host. Previous Comments: ------------------------------------------------------------------------ [2015-10-22 15:33:49] fullermd+php at over-yonder dot net This is a presumably a result of the REDIRECT_URL change in 2.4.17. http://article.gmane.org/gmane.comp.apache.user/108460 ------------------------------------------------------------------------ [2015-10-21 10:17:18] admin at franceserv dot fr Description: ------------ With a simple : <?php phpinfo(); ?> If we look the variable $_SERVER["PHP_SELF"], when the website is running with : Apache 2.4.16 + suPHP : OK Apache 2.4.16 + PHP-FPM : OK Apache 2.4.17 + suPHP : OK Apache 2.4.17 + PHP-FPM : WRONG To obtain the error and check with my webserver in Apache 2.4.17, you need to change your hosts file on this way : 195.154.164.142 www.franceserv.fr And when you go to http://www.franceserv.fr/data/phpinfo/, if the System name is "web2", you will see this : $_SERVER["PHP_SELF"] = http://www.franceserv.fr/data/phpinfo/ and it's WRONG, because there are no domain name and protocol in a PHP_SELF variable. If you take off the line from your hosts file, go to the same address and refresh the page (check your cache, you need to be on System name web1 or web3, not web2), you will see that : $_SERVER["PHP_SELF"] = /data/phpinfo/index.php which is correct. The problem exist only with Apache 2.4.17 + PHP-FPM. When i test with 2.4.16 + PHP-FPM all is GOOD. php.ini are same between PHP 5.4.16 and 5.4.17 and httpd.conf are same between Apache 2.4.16 and 2.4.17. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70757&edit=1

« previous php.bugs (#196750) next »