I have a Login process I've been working on. If i run it on my hosted server under Linux/Apache/PHP 4 it works fine. When run on localhost with Win XP/Apache/PHP 5, it drops the session between the login.php and the menu.php page. I've read about session_start windows problems but can't pinpoint why this will not work on windows. I'm using the following process steps.
index.html - This has form for user and password sign-on, form post values sent to the login file.
login.php - starts session sets userid and permission value to session values.
menu.php - if session isset shows the menu for user
Now if I skip the index.html and manually insert username and pass then it maintians the session to the menu.php but started from the index.html it drops the session between login and menu?
I can force it to work by using SID with string for the menu page:
header("Location:menu.php?" . SID);
but header("Location:menu.php"); by itself does not pass the session on.
Any ideas on why this works different or best way to make code work for both linux/apache and windows/apache? I guess I could just pass SID with the string but would prefer not to show the SID in the url.
Apparently Zone Alarm Pro causes this problem. If I shut off ZA then the sessions work, work better. It doesn't effect the remote server just //Localhost. I changed the settings in ZA for ad blocking, Header and Session blocking and it still caused the problem. Shutting down ZA solved it and also allowed the Session ID to be hidden. Zone Alarm should fix this problem.