php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #23610 PATH_TRANSLATED is EMPTY when PATH_INFO is not set
Submitted: 2003-05-13 10:00 UTC Modified: 2005-04-06 03:03 UTC
Votes:13
Avg. Score:4.6 ± 0.6
Reproduced:9 of 9 (100.0%)
Same Version:1 (11.1%)
Same OS:3 (33.3%)
From: support at sensvirtuel dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.3.2 OS: Linux (redhat 8.0)
Private report: No CVE-ID:
 [2003-05-13 10:00 UTC] support at sensvirtuel dot com
OS: RedHat Linux 8.0
Apache: httpd-2.0.44
PHP: php-4.3.1 (recompiled from source)

regsiter globals set to ON in PHP.INI

I spend a lot of days to find the reason why theses variables are empty.
I found some people who have the same problem but never answer about it.
the only way (or answer) is downgrade to apache 1.3
is it REALY the only way ???




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-05-13 14:18 UTC] moriyoshi@php.net
$_SERVER['PATH_TRANSLATED'] is also empty in any condition.

 [2003-05-13 14:39 UTC] moriyoshi@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 [2003-05-14 02:07 UTC] shane@php.net
This is not a bug, Apache is doing the right thing.  PATH_TRANSLATED is the translation of PATH_INFO.  See http://cgi-spec.golux.com/ 
 [2003-05-14 13:39 UTC] moriyoshi@php.net
The patch was reverted, and we're going to mark this PR as a documentation problem for the following reasons:

1. PATH_TRANSLATED itself hadn't been implemented in either Apache2 SAPI as of 4.3.2-RC1.

http://cvs.php.net/diff.php/php4/sapi/apache2filter/sapi_apache2.c?r1=1.107&r2=1.108&ty=h

2. PATH_TRANSLATED is merely a supplementary piece of information on the request URL and its availability is implementation-dependent.

3. As defined in the specification Shane mentioned, PATH_TRANSLATED should not be present when PATH_INFO is not populated because PATH_TRANSLATED is a translated form of PATH_INFO. In this point, Apache1 SAPI does somewhat an evil thing.


 [2003-06-19 08:41 UTC] fillmore at nrcan dot gc dot ca
We recently upgraded PHP from 4.3.0 to 4.3.2, and some of
our scripts are now broken because they use PATH_TRANSLATED
to compute the document root directory of the web site,
but PATH_TRANSLATED is now empty.  Is there another reliable
method to find the document root?
We are running the NSAPI version of PHP on iPlanet 
Web Server 6.0.
 [2004-04-17 21:39 UTC] nlopess@php.net
Is there any chance to implement it? Some old scripts may rely on this feature, including REDIRECT_URL (used in phpdoc's livedocs).
 [2004-04-18 01:03 UTC] derick@php.net
No, read the other comments. Resetting this to a Documentation problem, which it is.
 [2004-04-19 16:52 UTC] nlopess@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

This was already in the migration from PHP 4 to PHP 5 appendice.
I've just copied the note to the apache function reference.
 [2004-08-26 21:01 UTC] phpbugs at kevin dot offwhite dot net
I just spent a good amount of time trying to figure out why PATH_TRANSLATED suddenly stopped working on me.  Therefore I think you still have a couple documentation issues regarding this.

1) The first place I looked, and the first place I would suspect other people would look, to see if the variable stopped being supported at a certain revision is:
http://us3.php.net/reserved.variables

2) The example code for highlight_file() should be changed to not use the non-existant PATH_TRANSLATED variable:
http://us4.php.net/highlight_file
 [2004-08-27 01:53 UTC] philip@php.net
Agreed, especially since this change took place in PHP 4.3.2 and not PHP 5.0.0.  Should that note be removed from the migration5 docs?

I added a note within the PATH_TRANSLATED docs, updated the note in ref.apache, and replaced PATH_TRANSLATED with SCRIPT_FILENAME in the highlight_file() example.  Thank you Kevin for the report.

There is another open bug report out there that requests every BC break to be documented...like this one.  Once done, this information will be added there as well.
 [2005-04-06 03:03 UTC] philip@php.net
All documentation has been updated and will show up when the manual is next built. Thanks for the report.
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Sun Apr 20 05:03:19 2014 UTC