Re: DOCUMENT_ROOT disappeared on me!

From: Date: Tue, 02 Jul 2002 14:23:18 +0000
Subject: Re: DOCUMENT_ROOT disappeared on me!
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-104919@lists.php.net to get a copy of this message
Try $_SERVER['DOCUMENT_ROOT']. Global register is turned off by default in PHP version 4.2.x. See http://www.php.net/release_4_1_0.php for more detail. Global register had been turned off as part of more security since many people use the global register. So, $_SERVER, $_ENV, $_SESSION, etc. is use for this purpose. FletchSOD "David E. Weekly" <dweekly@CommunityColo.net> wrote in message news:20020702050128.98129.qmail@pb1.pair.com... > All, > > I upgraded from PHP 4.1.2 to 4.2.1 today along with revving Apache to 1.3.26 > from 1.3.22, and, woe is me, my $DOCUMENT_ROOT now evaluates to "" on all of > my PHP pages! > > phpinfo() shows "DOCUMENT_ROOT" being set correctly under the Apache > variables category. I tried several variations, including setting "global > $DOCUMENT_ROOT:" and "$ENV{DOCUMENT_ROOT}" and > "$GLOBALS["DOCUMENT_ROOT"]" > and so forth, but all to no avail. Good 'ol $DOCUMENT_ROOT seems quite gone, > and I wasn't able to find mentions of this happening to others on the 'Net. > Any pointers? > > -david > >

« previous php.general (#104919) next »