php.net |  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
Votes:1
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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: vvv at colocall dot net
New email:
PHP Version: OS:

 

 [2007-09-18 10:51 UTC] vvv at colocall dot net
Description:
------------
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:
----------------
/path/test.php


Actual result:
--------------
/path/test.php/path/test.php


Patches

Pull Requests

History

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] jani@php.net
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] dmitry@php.net
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 http://127.0.0.1/test/phpinfo.php 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 http://snaps.php.net/php5.2-200709240630.tar.bz2

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] jani@php.net
Dmitry, use --disable-path-info-check and you'll get the problem.

 [2007-09-24 11:44 UTC] dmitry@php.net
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
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jan 22 14:01:29 2025 UTC