Re: session_unset & session_destroy being called outside of logic.

From: Date: Thu, 13 Sep 2001 22:56:31 +0000
Subject: Re: session_unset & session_destroy being called outside of logic.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-67281@lists.php.net to get a copy of this message
Thanks for the reply Kirk! > > case logout: > > session_unset(); > > session_destroy(); > > $AuthErr = "<FONT SIZE=-1 COLOR=red>Session Terminated</FONT>"; > > break; > > > > > > What is happening, is after the user authenticates and logs > > in, everything > > looks good, but whenever the user follows any link, the > > session gets unset > > and destroyed. > > > Have you verified that the session file actually disappears? This sounds > more like the session ID is not getting passed along to the next page, so > that PHP is not aware that a session already exists (and so starts a new > one). The session ID is usually passed between pages using a cookie. The ID > is what allows PHP to find the correct session file and restore the session > variable values. > This is what was happening when I first had the problem. I removed the call to session_destroy() from my code, and it seems to be working perfectly now. again, thanks for the response! -Jason

« previous php.general (#67281) next »