in reply to Re: CGI::Session - non-stop session creation problem
in thread CGI::Session - non-stop session creation problem
my $session = new CGI::Session(undef, $empty, {Directory=>"c:/apac +he/sessions"}); $session->expire('+18h'); $session->param("userID", $userID); my $cookie = $foo->cookie(-name => 'main', -value => $session->id, -expires => '+30d', -path => '/'); print $foo->header(-cookie => $cookie);
The problem is that, regardless of whether or not the cookie exists, a new session is created.my $sid = $foo->cookie('main') || undef; my $session = new CGI::Session(undef, $sid, {Directory=>'c:/apache/ses +sions'});
|
|---|