Bug #1623 Updated: Inconsistent/incorrect PATH_TRANSLATED

From: Date: Sun, 16 Jun 2002 12:32:45 +0000
Subject: Bug #1623 Updated: Inconsistent/incorrect PATH_TRANSLATED
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-10636@lists.php.net to get a copy of this message
ID: 1623 Updated by: sander@php.net Reported By: greg@elysium.ltd.uk -Status: Open +Status: Bogus Bug Type: Misbehaving function Operating System: Linux 2.0.35 PHP Version: 3.0.9 New Comment: Thank you for taking the time to report a problem with PHP. Unfortunately, PHP 3 is no longer supported. Please download the latest version of PHP 4 from http://www.php.net/downloads.php If you are able to reproduce the bug with one of the latest versions of PHP, please change the PHP version on this bug report to the version you tested and change the status back to "Open". Again, thank you for your continued support of PHP. Previous Comments: ------------------------------------------------------------------------ [1999-06-29 07:31:11] greg@elysium.ltd.uk Actually in the case of using PHP as a handler, the phpinfo version of PATH_TRANSLATED is the correct one, and since this is the only way of knowing the true path to the file the behaviour explained above makes it impossible to work this out. So, unless I've got something wrong, the PHP version definitely needs to be changed. ------------------------------------------------------------------------ [1999-06-29 06:44:04] greg@elysium.ltd.uk (Under Apache 1.3.6.) There is a contradiction between the value PHP returns for PATH_TRANSLATED and the value displayed by phpinfo, e.g. in the following script (foo.php3): print "$PATH_INFO<BR>\n"; print "$PATH_TRANSLATED<BR>\n"; phpinfo(); I first noticed the problem when trying to get a script to act as a handler for files in a subdirectory (using a .htaccess file with AddHandler and Action directives), but the problem is more general. PATH_INFO always seems to agree with phpinfo, and PATH_TRANSLATED always seems to be the full pathname of the actual PHP script, regardless of what phpinfo says. For example, fetching "http://www/~greg/foo.php3" complains only that PATH_INFO is uninitialised, and says PATH_TRANSLATED=/home/greg/public_html/foo.php3, whereas phpinfo does not display either PATH_INFO or PATH_TRANSLATED in this case. Fetching "http://www/~greg/foo.php3/bar" agrees with phpinfo that PATH_INFO=/bar, but says PATH_TRANSLATED=/home/greg/public_html/foo.php3 (same as the first example), whereas phpinfo says PATH_TRANSLATED=/var/lib/htdocs/bar (definitely wrong). This could be an Apache bug as well/instead, but phpinfo needs correcting if the Apache version of the variable is actually inaccessible to PHP... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=1623&edit=1

« previous php.bugs (#10636) next »