By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,716 Members | 1,306 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,716 IT Pros & Developers. It's quick & easy.

$DOCUMENT_ROOT and mod_userdir

P: n/a
When you publish a website in /home/username/public_html and make it
availabe with the mod_userdir apache module, it can be accessed via
http://server/~username/. In that case though, the $DOCUMENT_ROOT
variable is still e.g. /var/www/html. Is there another variable or a trick
to get /home/username/public_html instead?

Frederik

--
Browse securily and fast with the Mozilla Firefox web browser
http://www.spreadfirefox.com/?q=affi...id=617&t=1
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
*** Frederik Himpe escribió/wrote (Wed, 22 Sep 2004 15:24:18 GMT):
When you publish a website in /home/username/public_html and make it
availabe with the mod_userdir apache module, it can be accessed via
http://server/~username/. In that case though, the $DOCUMENT_ROOT
variable is still e.g. /var/www/html. Is there another variable or a trick
to get /home/username/public_html instead?


Maybe playing around with $_SERVER['PHP_SELF'] and basedir().

--
-+ Álvaro G. Vicario - Burgos, Spain
+- http://www.demogracia.com (la web de humor barnizada para la intemperie)
++ Las dudas informáticas recibidas por correo irán directas a la papelera
-+ I'm not a free help desk, please don't e-mail me your questions
--
Jul 17 '05 #2

P: n/a
Frederik Himpe <se*@reply.to.invalid> wrote:
When you publish a website in /home/username/public_html and make it
availabe with the mod_userdir apache module, it can be accessed via
http://server/~username/. In that case though, the $DOCUMENT_ROOT
variable is still e.g. /var/www/html. Is there another variable or a trick
to get /home/username/public_html instead?

Frederik


Apache transmits DOCUMENT_ROOT as environmental variable (sp?) to PHP, so
maybe you can override it using SetEnv?

--
Simon Stienen <http://dangerouscat.net> <http://slashlife.de>
»What you do in this world is a matter of no consequence,
The question is, what can you make people believe that you have done.«
-- Sherlock Holmes in "A Study in Scarlet" by Sir Arthur Conan Doyle
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.