×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

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

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

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

(OP)
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

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

Hi

Tried to also check whether the session is_expired() ? ( Just asking, I never used that module. )

Feherke.
feherke.github.io

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close