A person using a script of mine recently upgraded to PHP 4.3.1. My script uses sessions, and when someone logins, it sets some session info, like so:
$_SESSION['loggedin'] = 1;
The $_SESSION['loggedin'] is checked in various places in the script to see if it is set to 1, and that the person is logged in. Now, this has been working fine for a while on various server set-ups. This person just upgraded to php 4.3.1, and suddenly it's acting hinky. Some pages, that all call the exact same header code that looks basically like so:
if ($_SESSION['loggedin'] == "1")
{
echo "Logged In";
}
else
{
echo "Log In Please";
}
are suddenly showing up as logged in on one page, and not on another. Refreshing pages will sometimes yield logged in, sometimes not. You can refresh a page 10 times, and get 5 logged ins, and 5 not logged ins. It's as if the session information is getting lost sometimes. I should add that this exact same code is working fine on several other servers running 4.3.1, so I'm not sure why this specific one is having issues. Any ideas on why this might be happening?