php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49840 PHP_SELF returns incorrect value
Submitted: 2009-10-12 03:47 UTC Modified: 2021-03-14 04:22 UTC
Votes:4
Avg. Score:2.5 ± 0.9
Reproduced:1 of 2 (50.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: lxd717 at gmail dot com Assigned: cmb (profile)
Status: No Feedback Package: PHP options/info functions
PHP Version: 5.2.11 OS: win32 only - Apache/2.2.13
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2009-10-12 03:47 UTC] lxd717 at gmail dot com
Description:
------------
PHP_SELF returns incorrect value.
I creat a folder with chinese, the path is '/confucian/西方哲学著作/', and then I check phpinfo(),I found that $_SERVER['PHP_SELF'] returns incorrect value. But folders Created in english found no errors.

Reproduce code:
---------------
file: test.php
<?php
phpinfo();
?>

The script test.php was created in a non-english folder,such as '/confucian/西方哲学著作/'.

Expected result:
----------------
/confucian/%e8%a5%bf%e6%96%b9%e5%93%b2%e5%ad%a6%e8%91%97%e4%bd%9c/test.php
or
/confucian/西方哲学著作/test.php



Actual result:
--------------
/confucian/η??՜ѧָ׷/index.php/confucian/???????1??2?-|???????/index.php 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-10-12 03:48 UTC] lxd717 at gmail dot com
Actual result:
--------------
/confucian/η??՜ѧָ׷/test.php/confucian/???????1??2?-|???????/test.
php
 [2009-10-12 11:10 UTC] sjoerd@php.net
See also Bug #49825 PHP_SELF duplicate path.
 [2009-10-12 20:11 UTC] srinatar@php.net
also provide the version of web server are you using ? as bug #49825 mentions, are you seeing this issue with IIS as well ? if yes, then this bug will need to be moved as duplicate of 49825 . 
 [2009-10-14 03:19 UTC] lxd717 at gmail dot com
version of web server: Apache/2.2.13 (Win32) 
useing IIS: not tested!
 [2021-03-03 13:18 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-03-03 13:18 UTC] cmb@php.net
Is that still an issue with any of the actively supported PHP
versions[1]?

[1] <https://www.php.net/supported-versions.php>
 [2021-03-14 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 02:01:28 2024 UTC