ID: 24886 User updated by: lenar at city dot ee Reported By: lenar at city dot ee -Status: Feedback +Status: Open Bug Type: Apache related Operating System: debian/unstable PHP Version: 4.3.3RC2 New Comment:
Really it's hard to explain this. One thing is for sure: echo $_SERVER['PATH_TRANSLATED'] and echo $PATH_TRANSLATED give different outputs. register_globals is _on_. Actually after studying it seems that $PATH_TRANSLATED gets the same value that is in $_ENV['PATH_TRANSLATED'] which in turn seems to be DOCUMENT_ROOT but sometimes it is not the correct DOCUMENT_ROOT but document root of some other virtual host. But anyway it should be easily testable to some degree with this code: <? echo $PATH_TRANSLATED . "\n"; echo $_SERVER['PATH_TRANSLATED']; ?> I get: /var/www/ /home/user/public_html/index.php My variables_order = "EGPCS" So I would expect the value in $_SERVER to be accessible by $PATH_TRANSLATED not the one in $_ENV. Why the value in $_ENV sometimes contains the path of some other virtul host's document root is still beyond me. Apache is 1.3.27 Previous Comments: ------------------------------------------------------------------------ [2003-07-31 13:23:05] [EMAIL PROTECTED] Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. ------------------------------------------------------------------------ [2003-07-31 11:05:31] lenar at city dot ee Description: ------------ in apache configuration where many virtual hosts are in use, PATH_TRANSLATED doesn't always get set to correct path. Instead the value seems to reflect some other (older) request. Possibly the value is correct only if brand new apache child serves the request. The value in $_SERVER array is always correct. Current workaround: add extract($_SERVER, EXTR_OVERWRITE); to your auto-prepend php file. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24886&edit=1