rjsaulakh has asked for the wisdom of the Perl Monks concerning the following question:
my following program is working fine but i am not able to find where my session variable are getting stored or at all there getting stored or not , though i have given a path where need to be stored
another query is that i am using this script to log session variables for user who login through a html site .so where do i call this script so that i keep a log of all user valid or invalid trying to login in
after logging in user will be accessing database and also editing it . how can i keep track of this
do i write another script for take help of sessio variables for the same
#!c:\Perl\bin\perl.exe -w use strict; use CGI::Carp qw(fatalsToBrowser); #die "Bad error here"; use CGI; use CGI::Cookie; use Data::Dumper; use CGI::Session; my $cgi = new CGI; my $session = new CGI::Session("driver:File", undef, { + Directory=>"\\B2R6A056A\wwwroot\Amexpmo\login\amex\raman" } ) or die $CGI::Session::errstr; print $cgi->header; print $cgi->start_html; #print <<HERE; #<b>jkasgdf</b> use constant SESSION_COOKIE => "MY_SITE_SIDE"; my $sid = $cgi->cookie("SESSION_COOKIE") || $cgi->param("sid") || unde +f; #creating a new session print "Your session id is ", $session->id(); # A cookie is being created which is then being send to the user brows +er my $cookie = $cgi->cookie(CGISESSID => $session->id ); print $cgi->header(-cookie=>$cookie); $session->save_param($cgi, ["userid", "password"]); # this line saves all the available/accessible CGI params $session->save_param($cgi); print Dumper(\$session); $session->expire('+3h'); #HERE #print $cgi->end_html;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: cgi session
by bart (Canon) on May 28, 2005 at 10:43 UTC | |
|
Re: cgi session
by castaway (Parson) on May 28, 2005 at 08:13 UTC | |
| |
| |
|
Re: cgi session
by Zaxo (Archbishop) on May 28, 2005 at 07:26 UTC |