I’ve just discovered a setting on the server I’m developing a site for that is different from my localhost settings, however, I can’t track down where to change it.
Here’s a simple example of what’s happening.
$_SESSION['Animal'] = "Dog";
echo "#1: ".$_SESSION['Animal']."<br/>";
echo "#2: ".$Animal;
On my localhost, the server returns:
#1: Dog
#2:
On the public host, the server returns:
#1: Dog
#2: Dog
I’m guessing this is a setting in the public servers php.ini file, however, I cannot locate which setting it is.
The Registered Globals directive appears to be on.
Information about the register_globals ini setting
As indicated by the statement above, it is highly recommended that you disable this in your php.ini file on your public server.
If you don’t have access to the php.ini file on your public server, the manual suggests an alternative: