Re: cvs: phpweb /error index.php

From: Date: Sat, 24 May 2003 18:53:31 +0000
Subject: Re: cvs: phpweb /error index.php
References: 1 2  Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-18032@lists.php.net to get a copy of this message
+    include_once $_SERVER['DOCUMENT_ROOT'] . $try;
I've experienced that with mass virtual hosting in Apache (see http://httpd.apache.org/docs/mod/mod_vhost_alias.html), the DOCUMENT_ROOT isn't defined as expected. This could of course just be my config, but I use this mass virtual hosting feature on my dev-server, and the DOCUMENT_ROOT on all virtualhost served is set to /var/www - the document-root set in the main apache configuration - not to /home/devel/htdocs/<hostname>, as I expected.. As I said, this could just be my apache beeing set up incorrectly, but if this is the way it is, that include_once-line could break things for people using this apache-feature.
This is documented in the Apache manual: "Neither of these modules is responsible for setting the DOCUMENT_ROOT environment variable so if any CGIs or SSI documents make use of it they will get a misleading value." That is not a problem for us though. I don't think that any PHP mirror would be set up with mass vhosts, as that would leave the site work without most of the convinience features. I don't know of settings, which enbale mass vhosts to have the config outlined at http://php.net/mirroring And by the way, we are using $DOCUMENT_ROOT for many things in the code for a long time now (given that we still require register_globals on). Goba

« previous php.mirrors (#18032) next »