This works!
my $dbh = $self->dbh();
$self->session_config(
CGI_SESSION_OPTIONS => ["driver:MySQL", $session_id, {Handle=>$dbh}],
################### # take out these # COOKIE_PARAMS => { -expires => 'now'}, # SEND_COOKIE => 1 # ################### ); my $session = $self->session;
my $logged_on_status = $session->param('_IS_LOGGED_ON');
################### # add this # $self->session_cookie(-expires => 'now'); # ################### . . .
On Mar 14, 2005, at 3:37 PM, Peter Fogg wrote:
Hello all,
The code below is supposed to delete the session cookie from the requesting
browser; it successfully delete the session record from the table. I am using
both the DBH and Session plugins to CGI::Application.
. . . my $cgi = $self->query(); my $session_id = $cgi->cookie('CGISESSID');
my $dbh = $self->dbh();
$self->session_config(
CGI_SESSION_OPTIONS => ["driver:MySQL", $session_id, {Handle=>$dbh}],
COOKIE_PARAMS => { -expires => 'now'},
SEND_COOKIE => 1
);
my $session = $self->session;
my $logged_on_status = $session->param('_IS_LOGGED_ON'); $session->delete(); $session->flush(); . . .
However, the following when I am not using the plugins.
.
.
.
my $dbh = DBI->connect($data_source, $db_Username, $db_Password,
{RaiseError => 1, PrintError => 0})
or die "Can't connect to $data_source: $DBI::errstr";
my $session = CGI::Session->new("driver:MySQL", $session_id, {Handle=>$dbh});
my $logged_on_status = $session->param('_IS_LOGGED_ON');
$session->delete();
$session->flush();
my $sid_cookie = $cgi->cookie( -name=>'CGISESSID', -value=>$session_id, -expires=>'now' ); $self->header_props(-type=>'text/html', -cookie=>$sid_cookie); . . .
What am I doing wrong?
Peter -
--------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/cgiapp@lists.erlbaum.net/ http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/cgiapp@lists.erlbaum.net/ http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]