Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
$id = $query->cookie(-name=>"SESSID"); eval { tie %session, 'Apache::Session::File', $id, { Directory => "$cartInfoPath", LockDirectory => "$cartInfoPath"}; }; if ($@) { if ($@ =~ /^Object does not exist in the data store/) { $id = undef; tie %session, 'Apache::Session::File', $id, { Directory => "$cartInfoPath", LockDirectory => "$cartInfoPath"}; } } if ($id == undef) { $cookie = $query->cookie( -name=>'SESSID', -value=>$session{_session_id}, -expires=>'+1y', -path=>'/'); print $query->header(-cookie=>$cookie); print "Assigned session ID ".$session{_session_id}."<br>\n"; } else { print $query->header(); print "Not assigned session ID already ".$session{_session_id}." < +br>n"; }
Edit by dws to fix formatting and add <code> tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: HELP...Apache Session problem
by rob_au (Abbot) on Sep 29, 2002 at 10:07 UTC |