php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43403 $_SERVER['PHP_SELF'] gives incorrect value
Submitted: 2007-11-25 22:28 UTC Modified: 2008-04-17 01:00 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: postmaster at itsacon dot net Assigned: dmitry (profile)
Status: No Feedback Package: CGI/CLI related
PHP Version: 5.2.6RC5-dev OS: win32
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: postmaster at itsacon dot net
New email:
PHP Version: OS:

 

 [2007-11-25 22:28 UTC] postmaster at itsacon dot net
Description:
------------
In directories below document root, PHP_SELF returns an incorrect value (path repeated at end of string)

Reproduce code:
---------------
/* Place this code in a SUBDIRECTORY (such as localhost/testdir/test.php */
<?php 
echo $_SERVER['PHP_SELF'];
?>

/* or see http://www2.bijscharp.nl/bugdemo/winxp64_php_self.php
 (script contains code above) 
For info on server, see http://www2.bijscharp.nl/bugdemo/phpinfo.php */

Expected result:
----------------
The result should be:
/bugdemo/winxp64_php_self.php

Actual result:
--------------
The result is:
bugdemo/winxp64_php_self.php/bugdemo

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-11-26 11:19 UTC] postmaster at itsacon dot net
Upgrading to latest CVS snapshow (5.2.6-dev) does NOT solve the problem. See scripts in bug report, path is still repeated at end of PHP_SELF value.
 [2007-11-26 11:44 UTC] jani@php.net
What SAPI are you using? CGI or something else?
 [2007-11-26 11:46 UTC] jani@php.net
I missed the phpinfo() url. And it's slow as hell so pasting the relevant info here: Server API 	CGI/FastCGI

Dmitry, something missed in fixing this?


 [2007-11-26 13:51 UTC] postmaster at itsacon dot net
Yeah server is slow as hell. Seems to be the combination of PHP 32 bit on a 64 bit Windows, HTML files parse at normal speed.

Server is Xitami 2.5c2 (32 bit)

Problem looks a bit like bug 43030 (http://bugs.php.net/bug.php?id=43030), only now just the path is duplicated. That bug concerns Windows 2003, which uses roughly the same kernel as XP 64 bit, so they might be related.

Hope this helps.

(PS: unrelated, but are there plans to release 64 bit Windows binaries in the future?)
 [2008-04-08 17:46 UTC] postmaster at itsacon dot net
Installed the snapshot, but bug still persists.

One note however: Server is no longer running XP Pro 64bit.
It is now running win2k again (as XP64 + PHP was too slow).
 [2008-04-09 08:25 UTC] jani@php.net
Can you try it using Apache instead of Xitami?
 [2008-04-17 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 05:01:30 2024 UTC