Re: Apache: SERVER_NAME gone?

From: Date: Sun, 28 Apr 2002 01:53:50 +0000
Subject: Re: Apache: SERVER_NAME gone?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-94954@lists.php.net to get a copy of this message
On Tue, 23 Jan 2001, The_RadiX wrote: > Hmm > > > because $SERVER_NAME is created IF the php > > directive register_globals = on. this setting > > is off by default as of PHP 4.2.0. all > > server predefined variables behave this way, > > such as $PHP_SELF, etc. > > Yes so I've heard... One thing though.. > I use PHP4.1.1... not 4.2.x > > Anywayz will try the $_SERVER[xxx] trick Please realize that it doesn't matter what version you're using, I was just saying "the default." So, you should go see what your settings are via the wonderful phpinfo() function. In fact, phpinfo will show you the values of many predefined variables such as SERVER_NAME, PHP_SELF, REQUEST_URI, etc. Which ones exist depends on the particular web server. If a var exists at all, phpinfo will tell you. $_SERVER is an array of all web server predefined variables. As is $HTTP_SERVER_VARS. At least one of these will always be available (nobody uses 4.0.2- anymore right? Phew, no need to bring up track_vars then :) Regards, Philip Olson

« previous php.general (#94954) next »