CGI-Session - Re: problem with sessionID

Posted on Thu Oct 6 14:57:55 2005 by egor604 in response to 484 (See the whole thread of 4)
Re: problem with sessionID
same problem i faced under mod_perl2(registry script without +GlobalRequest) + mysql driver.. after some time i solve my troubles.. here is "principal" truncated example:
$q = new CGI($r); .... $session = new CGI::Session("driver:mysql", $self->get_session_id() || $q, {Handle=>$dbh}); .... $session->flush; .... $dbh->disconnect; .... sub get_session_id { my $self = shift; my %cookie = CGI::Cookie->fetch($self->{r}); if ($cookie{CGISESSID}) {return $cookie{CGISESSID}->value;} return undef; }
Write a response