php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4788 $PHP_SELF value incorrect when URL omits index.php part
Submitted: 2000-06-02 22:16 UTC Modified: 2000-08-18 13:24 UTC
From: anj at aps dot anl dot gov Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Release Candidate 1 OS: Solaris 2.6 sparc
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: anj at aps dot anl dot gov
New email:
PHP Version: OS:

 

 [2000-06-02 22:16 UTC] anj at aps dot anl dot gov
Our server (Netscape Enterprise 3.0) and PHP are set up to serve the index.php file if only a directory name is specified in a URL. When this facility is used, the $PHP_SELF variable contains the directory part doubled.  Eg, the URL http://www.aps.anl.gov/~anj/test/ results in $PHP_SELF = /~anj/test//~anj/test/index.php whereas the URL http://www.aps.anl.gov/~anj/test/index.php returns the correct string. The PATH_INFO variable is correct though, so I use that as a workaround although that may not be correct in all situations. The above URLs currently display the relevent variables and phpinfo().

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-26 06:06 UTC] zak@php.net
Have you tried a recent release of php?  If so, does the problem occur in the new release?
 [2000-08-18 13:24 UTC] waldschrott@php.net
Closed due to missing user feedback.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 05:01:33 2025 UTC