Bug #2386 Updated: $PHP_SELF doesn't handle $PATH_INFO correctly
| From: | andy@php.net | Date: | Sun, 22 Jul 2001 21:05:20 +0000 |
| Subject: | Bug #2386 Updated: $PHP_SELF doesn't handle $PATH_INFO correctly | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-60672@lists.php.net to get a copy of this message | ||
ID: 2386
Updated by: andy
Reported By: phpbugs@reuben.com
Status: Open
Bug Type: Misbehaving function
Operating System: Linux
PHP Version: 3.0.12
New Comment:
I have confirmed that PHP does this (even in 4.0.6), but I
don't know if it should be considered a bug or if it should
be changed.
Previous Comments:
------------------------------------------------------------------------
[1999-09-27 02:39:52] phpbugs@reuben.com
$PHP_SELF should always contain the location of the script itself, correct? Because if I use a url
like this:
/script.php3/more/path/info
then $PHP_SELF contains:
/script.php3/more/path/info
when it *seems* like it should only be:
/script.php3
as the extra path info is being sent *to* the script (as the variable $PATH_INFO) and has nothing to
do with where the script is. If you want to build the full URL again you could use "$PHP_SELF
. $PATH_INFO".
Does that make sense? I couldn't find an official reference for what $PHP_SELF is *supposed*
to describe, but it seems like it should just be the script.
- Isaac
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=2386&edit=1