Hi Jeff,
Thanks and Happy Holiday... This module you recommended unfortunately not in activestate perl's listed module to test the webpage timeout / after login say 10 mins no user's web activity timeout. I found this link CGI::Session::T utorial - Extended CGI::Session manual - search.cpan.org
But got apache error log :
[Mon Dec 29 02:41:30 2008] [error] [client 127.0.0.1] script not found or unable to stat: D:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin/cgi-session.pl
and access log error :
127.0.0.1 - - [29/Dec/2008:02:37:05 -0800] "GET /cgi-bin/cgi-session.pl HTTP/1.1" 404 220
Thanks and Happy Holiday... This module you recommended unfortunately not in activestate perl's listed module to test the webpage timeout / after login say 10 mins no user's web activity timeout. I found this link CGI::Session::T utorial - Extended CGI::Session manual - search.cpan.org
But got apache error log :
[Mon Dec 29 02:41:30 2008] [error] [client 127.0.0.1] script not found or unable to stat: D:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin/cgi-session.pl
and access log error :
127.0.0.1 - - [29/Dec/2008:02:37:05 -0800] "GET /cgi-bin/cgi-session.pl HTTP/1.1" 404 220
Code:
#!c:/perl/bin/perl.exe #!/usr/local/bin/perl print "Content-type: text/html\n\n"; # Object initialization: use CGI::Session; $session = new CGI::Session() or die CGI::Session->errstr;; $CGISESSID = $session->id(); #New $cookie = $query->cookie( -name => $session->name, -value => $session->id ); print $query->header( -cookie=>$cookie ); #new CGI::Session->name("SID"); $session = new CGI::Session(); # send proper HTTP header with cookies: print $session->header(); #New printf ("<a href=http://127.0.0.1/cgi-bin/signin.pl">click me</a>", $session->name, $session->id); #New $session = new CGI::Session( $sid ); $session = new CGI::Session( "serializer:freezethaw", $sid ); $session = new CGI::Session( "driver:mysql", $sid, {Handle=>$dbh} ); #New $cgi = new CGI::Simple(); $session = new CGI::Session ( $cgi ); $session = new CGI::Session( "driver:db_file;serializer:storable", $cgi); # etc #New my $name = $cgi->param('username'); $session->param('username', $name); #New $session->save_param(); # storing data in the session ##$session->param('f_name', 'Sherzod'); # or ##$session->param(-name=>'l_name', -value=>'Ruzmetov'); # flush the data from memory to the storage driver at least before your # program finishes since auto-flushing can be unreliable $session->flush(); #New $name = $session->param("name"); printf "<input type=\"text\" name=\"name\" value=\"%s\" />", $name; #New @fruits = @{ $session->param('fruits') }; #New $session->load_param($cgi, ["fruits"]); #New print $cgi->checkbox_group(fruits=>['apple', 'banana', 'apricot']); #New $template = new HTML::Template(filename=>"some.tmpl", associate=>$session); print $template->output(); #NEw Hello <a href="mailto:<TMPL_VAR email>"> <TMPL_VAR first_name> </a>! #New $session->clear(["~logged-in", "email"]); #New $email = $session->param("email"); # retrieving data ##my $f_name = $session->param('f_name'); # or ##my $l_name = $session->param(-name=>'l_name'); # clearing a certain session parameter ##$session->clear(["l_name", "f_name"]); # expire '_is_logged_in' flag after 10 idle minutes: ##$session->expire('is_logged_in', '+10m') # expire the session itself after 1 idle hour $session->expire('+1h'); # delete the session for good $session->delete();
Comment