[php-maint] Bug#492739: $_SERVER['PATH_TRANSLATED'] does not more work
Michelle Konzack
linux4michelle at tamay-dogan.net
Mon Jul 28 07:53:24 UTC 2008
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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-php-maint/attachments/20080728/07c360a3/attachment.pgp
More information about the pkg-php-maint
mailing list