in reply to Re^2: CGI::Session session expiration problems
in thread CGI::Session session expiration problems

I don't see anything in the documentation that suggests this behaviour. So, maybe print out the three times and debug from there. The ctime of a file cannot be changed (without erasing and recreating the file), at least on unixish filesystems. But maybe CGI::Session never sees your changing atime.

  • Comment on Re^3: CGI::Session session expiration problems

Replies are listed 'Best First'.
Re^4: CGI::Session session expiration problems
by speckled (Novice) on Jan 16, 2009 at 08:59 UTC
    print1 of $s->atime(): 1232096086 print1 of $s->ctime(): 1232096013 print1 of $s->expire(): 900 print2 of $s->atime(): 1232096188 print2 of $s->ctime(): 1232096013 print2 of $s->expire(): 900

      Are you sure that passing a number to ->expire() is the right way to specify a relative offset? From reading the documentation, I would try to use '+15m' or maybe '+900'. I think giving it a plain number means you give it the epoch time, which in your case would expire all sessions after 1970-01-01 00:14:59.

        In the previous post I was just printing the content of $s->expire(), $s->ctime() and $s->atime(). If you look at my second post you can see that $s->expire it was set to $s->expire('+15').

        This is the content of a session:

        $D = {'_SESSION_ID' => 'ff98369e0e3ef653f90301cc6fbf29a6','_SESSION_ET +IME' => 900,'_SESSION_REMOTE_ADDR' => '192.168.x.x','_SESSION_CTIME' +=> 1232014477,'_SESSION_ATIME' => 1232014492,'_SESSION_EXPIRE_LIST' = +> {}};;$D