RE: [PHP] No constants being set. HUH?

From: Date: Thu, 16 Jan 2003 15:36:58 +0000
Subject: RE: [PHP] No constants being set. HUH?
Groups: php.general 
Request: Send a blank email to php-general+get-131876@lists.php.net to get a copy of this message
> -----Original Message----- > From: Mako Shark [mailto:phpman2000@yahoo.com] > Sent: 16 January 2003 15:26 > To: php-general@lists.php.net > Subject: [PHP] No constants being set. HUH? > > > I just JUST installed PHP onto a new server (my > first--kinda scary, new foray) and my pre-defined > constants (HTTP_SERVER, SCRIPT_NAME, etc.) Not predefined constants, predefined *global variables* -- and there's the clue. > aren't > being set. Any ideas? What switch do I have to flick? Almost certainly register_globals -- but don't! (Unless you have legacy code that must run asap.) Much better to leave register_globals=Off and get used to using the superglobal arrays -- in this case, you will want (iirc) $_SERVER['HTTP_SERVER'] and $_SERVER['SCRIPT_NAME']. For more on this topic, refer to the manula page on Predefined variables: http://www.php.net/manual/en/language.variables.predefined.php Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: m.ford@lmu.ac.uk Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211

« previous php.general (#131876) next »