Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

after session expires, it's empty and i can't initialize a new session...

Status
Not open for further replies.

spewn

Programmer
May 7, 2001
1,034
here's my code:

Code:
use CGI::Session;

$session = CGI::Session->load();

if ($session->is_empty) {
#print $session->header();
#print "your session is empty";
$session = $session->new();
}

$sSid = $session->id();

everything is fine the first go around, but it seems as though there is a default expiration because after a couple hours, my site "logs" me out and i'm back to the login page. after that, i can't seem to get a new session stored, as I'm using $sSid and checking the session value - it keeps changing. unless i completely close my browser and start a new session, it doesn't hold a new session.

i did the empty check and printed out the "your session is empty", which showed me that the session was empty, and so using the conditional I tried to create the new session, but it doesn't seem to take hold, as I'm not able to login.

any help here is appreciated.

- g
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top