> -----Original Message----- > From: Mako Shark [mailto:[EMAIL PROTECTED]] > Sent: 16 January 2003 15:26 > To: [EMAIL PROTECTED] > 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: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php