in reply to Perl CGI::Sessions

Comment: This was never answered, so I'm curious if anyone is still interested, or if it has been solved. I'd like to know what was wrong :-\

I'd give advice that was given earlier to me by moritz, make sure to flush the session, so that it's stored to disk properly: $session->flush();

Otherwise I'd want to see more code.


Demize

Replies are listed 'Best First'.
Re^2: Perl CGI::Sessions
by Anonymous Monk on Nov 05, 2015 at 20:34 UTC
    life saving advice!!!

    always use $session->flush()

    !!!!

    sometimes the redirection to the new page happens before session saves things to disk!

    I guess when the cgi script exits the session file is saved to disk, but redirecting to the new page happens before the script exits...

    thanks moritz and deMize

    bliako

Re^2: Perl CGI::Sessions
by Anonymous Monk on Jun 25, 2010 at 01:44 UTC
    Comment: This was never answered, so I'm curious if anyone is still interested, or if it has been solved. I'd like to know what was wrong :-\

    The OP hasn't been here in over a year ... the one person who answered hasn't been here in over a year ... you've been here a little over a year :) ... the OP only provided a fragment ... see Re^3: CGI::Session - expiry

      Yeah, I know it was old, but I come back to these questions time and again. It's nice to have a solution in the actual post, rather than many posts asking the same question and only one answer embedded in one of them.

      Thank you, anonymonk for replying though :)


      Demize
        I thought about waiting for a year before replying, but an hour passed and I lost my train of thought :)