Bug #2386: $PHP_SELF doesn't handle $PATH_INFO correctly

From: Date: Mon, 27 Sep 1999 06:39:52 +0000
Subject: Bug #2386: $PHP_SELF doesn't handle $PATH_INFO correctly
Groups: php.dev 
Request: Send a blank email to php-dev+get-11317@lists.php.net to get a copy of this message
From: phpbugs@reuben.com Operating system: Linux PHP version: 3.0.12 PHP Bug Type: Misbehaving function Bug description: $PHP_SELF doesn't handle $PATH_INFO correctly $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

« previous php.dev (#11317) next »