Session termination using use CGI::Session; redirection tot eh loginpage doesn't yet work

Discussion in 'Perl Misc' started by Ted Byers, Dec 21, 2011.

  1. Ted Byers

    Ted Byers Guest

    I finally figured out how to clear the session created using:

    my $session = CGI::Session->new('driver:mysql',$query,{ DataSource =>
    'dbi:mysql:profitorius',
    User =>
    'yyyyyyy',
    Password =>
    'xxxxxxx'});

    To do so, I am using:

    $session->clear('CGISESSID');
    $session->delete();
    $session->flush();

    my $scriptname = $query->url(-path=>1);
    $scriptname =~ s/cgi-bin\/logout\.pl/login\.html/;
    print $query->redirect(-location=>"$scriptname",-status=302);
    #print $session->header(-location=>$scriptname);

    When I do this, the session info goes away, but nothing I do has had
    the effect of redirecting the user to the login page. How do I get
    this to redirect to the login page?

    Thanks

    Ted
     
    Ted Byers, Dec 21, 2011
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. francois
    Replies:
    2
    Views:
    3,671
    Ather Ali Shaikh
    May 25, 2004
  2. Ather Ali Shaikh
    Replies:
    1
    Views:
    835
    Anachostic
    May 30, 2004
  3. AlesD
    Replies:
    3
    Views:
    479
    Victor Bazarov
    Aug 10, 2004
  4. ton
    Replies:
    3
    Views:
    976
    Mr. Arnold
    Feb 4, 2010
  5. Guy
    Replies:
    4
    Views:
    820
    Malcolm Dew-Jones
    Dec 11, 2003
Loading...

Share This Page