Re: multi dimensional arraySOLVED

From: Date: Fri, 06 May 2005 10:01:58 +0000
Subject: Re: multi dimensional arraySOLVED
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-214608@lists.php.net to get a copy of this message
thanks richard. In the PHP.ini its set to on but in the .htaccess file we've set it to OFF. could this still be causing the problem?? thanks again Angelo Zanetti Z Logic www.zlogic.co.za [c] +27 72 441 3355 [t] +27 21 469 1052 Richard Lynch wrote: >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. > > >

« previous php.general (#214608) next »