Closed GoogleCodeExporter closed 9 years ago
mod_vhost_dbd does not change the httpd server variable named document_root.
The reason is that a single copy of this httpd server variable is used
simultaneously by multiple requests. PHP defines it as 'The document root
directory under which the current script is executing, as defined in the
server's configuration file.'
Updated the WiKi to state this explicitly, as it isn't apparent that the
'document root as defined in the server's configuration file' is not the same
as the 'document root directory for a request' which is set by mod_vhost_dbd.
Original comment by Thomas.D...@gmail.com
on 17 Dec 2010 at 9:39
Original comment by Thomas.D...@gmail.com
on 17 Dec 2010 at 9:44
Original comment by Thomas.D...@gmail.com
on 18 Dec 2010 at 12:10
Original comment by Thomas.D...@gmail.com
on 16 Mar 2011 at 9:51
this option should be implemented!
Original comment by pawel....@gmail.com
on 7 Feb 2012 at 8:04
Why should this be implemented?
Apache currently stores a single DocumentRoot per server (i.e. per Virtual
Host), and all simultaneous requests use it at the same time. PHP, J2EE, etc.
read a copy of Apache's single DocumentRoot.
To make $_SERVER['DOCUMENT_ROOT'] (for PHP),
GetServletContext().GetRealPath("/") (for J2EE), etc. show the directory
selected by mod_vhost_dbd, it would require the module to store a separate
variable for each request - and require changes to each of these languages
(PHP, J2EE, etc) to access the new per-request variable instead of Apache's
per-server DocumentRoot variable.
While this might be possible (anything is possible) - it would be a large and
unwieldy change to mod_vhost_dbd, and it would also require cooperative changes
from all the various web languages (like PHP, Perl, ColdFusion, Java/J2EE,
etc.) to use it.
This does not seem like a reasonable change, since the directory selected by
mod_vhost_dbd is already available in all these languages - just not in the
variable named DocumentRoot.
Original comment by Thomas.D...@gmail.com
on 7 Feb 2012 at 3:44
Original issue reported on code.google.com by
dzysyak
on 24 Aug 2010 at 9:51Attachments: