|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42699 PHP_SELF duplicates path
Submitted: 2007-09-18 10:51 UTC Modified: 2007-09-24 11:44 UTC
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: vvv at colocall dot net Assigned: dmitry (profile)
Status: Closed Package: CGI/CLI related
PHP Version: 5.2CVS-2007-09-18 OS: FreeBSD 6.2, apache 2.2.6
Private report: No CVE-ID: None
 [2007-09-18 10:51 UTC] vvv at colocall dot net
Path appears to be duplicated.
The bug is absolutely the same as #42523, but not related to WinXP/IIS.

Reproduce code:
echo $_SERVER['PHP_SELF'];

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-18 11:22 UTC] vvv at colocall dot net
I've tried php5.2-200709180830 before submitting the bug.
I've got the same behavior as using php-5.2.4.
 [2007-09-18 12:23 UTC]
Dmitry, can you check this out please.
 [2007-09-19 02:01 UTC] w dot ashcroft at redfoxuk dot com
I noticed the bug fix for #42523 was a specific workaround for when the server software CGI variable was set as Microsoft-IIS; so clearly the "hack" fix for #42523 needs to be done properly if it doesn't fix the problem completely.
 [2007-09-19 11:43 UTC] vvv at colocall dot net
The problem has gone after recompiling without --disable-path-info-check.
FreeBSD port applies this option by default.
 [2007-09-21 14:35 UTC]
I cannot reproduce it:

Linux 2.6.22, glibc 2.6

'../configure' '--prefix=/home/dmitry/php/usr/php5.2-debug' '--with-config-file-path=/home/dmitry/php/usr/php5.2-debug/etc' '--enable-force-cgi-redirect' '--enable-fastcgi' '--enable-pic' '--enable-debug' '--enable-memory-limit' '--disable-rpath' '--with-regex=php' '--with-zlib' '--with-layout=GNU' '--enable-magic-quotes' '--enable-track-vars' '--disable-path-info-check'

Request to gives _SERVER["PHP_SELF"] == "/test/phpinfo.php".
 [2007-09-24 08:14 UTC] vvv at colocall dot net
I've just reproduce it with the snapshot

FreeBSD 6.2-RELEASE-p1

'./configure' '--with-layout=GNU' '--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all' '--enable-libxml' '--with-libxml-dir=/usr/local' '--enable-reflection' '--program-prefix=' '--disable-path-info-check' '--with-regex=php' '--with-zend-vm=CALL' '--disable-ipv6' '--prefix=/usr/local' '--mandir=/usr/local/man' '--infodir=/usr/local/info/'
 [2007-09-24 10:39 UTC]
Dmitry, use --disable-path-info-check and you'll get the problem.

 [2007-09-24 11:44 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Feb 24 07:01:28 2024 UTC