You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Arno Schäfer <sc...@jobpilot.com> on 2004/03/22 17:47:18 UTC

[users@httpd] PATH_TRANSLATED variable

Hi,

somewhere in Apache version 1.3.12 (or a slightly earlier version,
around Sep. 2001), the behaviour of the variable PATH_TRANSLATED seems
to have changed. Unfortunately, the change log for Apache 1.3 does not
mention that change, so it is hard to verify. BTW. I am acessing that
variable from within PHP 4.1.

Previously,

the following URL

http://www.myserver.de/test.phtml/bla/fasel

resulted in the following PATH_TRANSLATED value:

/OnlineServer/web/de/test.phtml

(which is the correct script file name, and seems to be a useful
information).

afterwards, and ever since, the same URL resulted in the following
value:

/OnlineServer/web/de/bla/fasel

which does not seem to make much sense to me.

The documentation explains PATH_TRANSLATED as

"The server provides a translated version of PATH_INFO, which takes the
path and does any virtual-to-physical mapping to it".

This is not really clear to me. Can anybody explain a bit more clearly
what the supposed meaning of PATH_TRANSLATED is? What am I supposed to
do with it? Can someone even remember why the behaviour was changed
then?

Best Regards,

Arno


-- 
Arno Schäfer | Head of IT Operations

mailto:schaefer@jobpilot.com
Tel.: + 49.6172.919-212  Fax: + 49.6172.919-546

jobpilot GmbH | Siemensstrasse 15-17 | D-61352 Bad Homburg, Germany
http://www.jobpilot.de | http://www.jobpilot.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] PATH_TRANSLATED variable

Posted by Joshua Slive <jo...@slive.ca>.
On Mon, 22 Mar 2004, Arno Schäfer wrote:
> Previously,
>
> the following URL
>
> http://www.myserver.de/test.phtml/bla/fasel
>
> resulted in the following PATH_TRANSLATED value:
>
> /OnlineServer/web/de/test.phtml
>
> (which is the correct script file name, and seems to be a useful
> information).
>
> afterwards, and ever since, the same URL resulted in the following
> value:
>
> /OnlineServer/web/de/bla/fasel
>
> which does not seem to make much sense to me.
>
> The documentation explains PATH_TRANSLATED as
>
> "The server provides a translated version of PATH_INFO, which takes the
> path and does any virtual-to-physical mapping to it".
>
> This is not really clear to me. Can anybody explain a bit more clearly
> what the supposed meaning of PATH_TRANSLATED is? What am I supposed to
> do with it? Can someone even remember why the behaviour was changed
> then?

PATH_INFO is the part of the path that follows the script name.  If you
look in the PATH_INFO env variable, you should find /bla/fasel.  The point
of PATH_TRANSLATED is to allow you to pass a filename into a script (via
PATH_INFO) and let the script be able to locate that filename in the
filesystem.  So if a file /bla/fasel existed on the webserver, it should
be located at /OnlineServer/web/de/bla/fasel.  (Most likely your
DocumentRoot is /OnlineServer/web/de, causing /bal/fasel to resolve under
there.)

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org