[php-maint] Bug#492739: Bug#492739: $_SERVER['PATH_TRANSLATED'] does not more work

Ondřej Surý ondrej at sury.org
Mon Jul 28 15:07:27 UTC 2008


severity 492739 normal
thank you

From http://us2.php.net/manual/en/reserved.variables.server.php:

"""    Note:  As of PHP 4.3.2, PATH_TRANSLATED is no longer set
implicitly under the Apache 2 SAPI in contrast to the situation in
Apache 1, where it's set to the same value as the SCRIPT_FILENAME
server variable when it's not populated by Apache. This change was
made to comply with the CGI specification that PATH_TRANSLATED should
only exist if PATH_INFO is defined.   Apache 2 users may use
AcceptPathInfo = On inside httpd.conf to define PATH_INFO.  """

So did you do your homework properly before filling this bug report
and have you read the docs and is PATH_INFO defined in your
environment?

Ondrej.

2008/7/28 Michelle Konzack <linux4michelle at tamay-dogan.net>:
> Package: php5
> Version: 5.2.0-8+etch10
> Severity: important
>
> Hello Maintainer,
>
> while under Sarge with  php4  $_SERVER['PATH_TRANSLATED']  was  working
> properly and also under php5 on the Gentoo VHost of my ISP, but it does
> not work on my recently installed Etch Server @home.
>
> My whole site with all its nearly 200 VHosts is ONLY a singel /index.php
> and the contents is generated based on $_SERVER['SERVER_NAME'] but since
> I need the physical path, my website is entirely broken.
>
> Note:   The path to the /index.php is
>            /var/www/customers/konzack/sites/index.php
>        and $_SERVER['PATH_TRANSLATED'] returns "/" which is wrong.
>
> Please can you look at it?
>
> The code sniplet from the beginning of the /index.php is:
>
> ----[ '/var/www/customers/konzack/sites/index.php' ]--------------------
> <?php
>
> $MY_PATH=dirname(dirname($_SERVER["PATH_TRANSLATED"]));
>
> $MY_CONFIG="$MY_PATH/HOST_" . $_SERVER["HTTP_HOST"];
>
> if ( is_file($MY_CONFIG) ) {
>  include $MY_CONFIG;
> } else {
>  header("Content-Type: text/plain");
>  die("Config for host \"$_SERVER[HTTP_HOST]\" not found.\n($MY_CONFIG)");
> }
> <snip>
> ------------------------------------------------------------------------
>
> And currently I have hardcoded the $MY_PATH which  is  not  the  optimal
> solution since it can be forgotten.
>
> Thanks, Greetings and nice Day/Evening
>    Michelle Konzack
>    Systemadministrator
>    24V Electronic Engineer
>    Tamay Dogan Network
>    Debian GNU/Linux Consultant
>
>
> --
> Linux-User #280138 with the Linux Counter, http://counter.li.org/
> ##################### Debian GNU/Linux Consultant #####################
> Michelle Konzack   Apt. 917                  ICQ #328449886
> +49/177/9351947    50, rue de Soultz         MSN LinuxMichi
> +33/6/61925193     67100 Strasbourg/France   IRC #Debian (irc.icq.com)
>
> _______________________________________________
> pkg-php-maint mailing list
> pkg-php-maint at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/pkg-php-maint
>



-- 
Ondřej Surý <ondrej at sury.org>


More information about the pkg-php-maint mailing list