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" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > 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 > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php