Re: multi dimensional arraySOLVED

From: Date: Fri, 06 May 2005 05:06:59 +0000
Subject: Re: multi dimensional arraySOLVED
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-214589@lists.php.net to get a copy of this message
On Thu, May 5, 2005 3:37 am, Angelo Zanetti said: > this is quite weird but apparently on the one server if you user $user > as a variable name thats what causes the problem. > I simply renamed my variable to something else and it worked, I find it > strange that it worked on 1 server and not the other, is it possible > that the different apache versions are responsible for this situation?? This would indicate to me that you've got register_globals "ON" and that your EGPCS settings are clobbering your $user variable with data from, say the environment $_ENV I'm betting that if you do: echo "ENV $_ENV[user]<br />\n"; echo "GET $_GET[user]<br />\n"; echo "POST $_POST[user]<br />\n"; echo "SESSION $_SESSION[user]<br />\n"; echo "COOKIE $_COOKIE[user]<br />\n"; in the script that was giving you trouble, you'll find that one of those is set. Actually, since they could be set to the empty string, you should be echo-in isset($_XXX['user']) in the above test. The correct solution, then, is to turn register_globals OFF. -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#214589) next »