P
Praki
Hi All,
This is the coding i have writtern to create the session in Perl.but i
getting session expired with in 5 min even if i m contineously wroking
onthe page.
$userid = $FORM{'uid'};
$password = $FORM{'password'};
$session = new CGI::Session("driver:File",undef,{'Directory'=>"/
tmp"});
$sid = $session->id();
# Write the session variable on the server
$session->param('username',$userid);
# $session->param('password',$password);
#create session cookie
$cookie = $query->cookie(CGISESSID => $session->id);
#session expire
$session->expire('+24h');
this code checks for the session existence
$session = new CGI::Session(undef, $sid, {Directory=>'/tmp'});
print $query->header( -cookie=>$cookie );
$username_session = $session->param('username');
if ($username_session eq "") {
&print_session_exp_header(" -- Session Expired -- ","Session
Expired.");
print "<h5>Please Relogin in Different Browser</h5>";
&print_trailer();
exit(0);
}
i dont know where i m going wrong.
can anyone plz correct with i have done any mistake or pointer to
correct the mistake.
thaks in advance
prakash
This is the coding i have writtern to create the session in Perl.but i
getting session expired with in 5 min even if i m contineously wroking
onthe page.
$userid = $FORM{'uid'};
$password = $FORM{'password'};
$session = new CGI::Session("driver:File",undef,{'Directory'=>"/
tmp"});
$sid = $session->id();
# Write the session variable on the server
$session->param('username',$userid);
# $session->param('password',$password);
#create session cookie
$cookie = $query->cookie(CGISESSID => $session->id);
#session expire
$session->expire('+24h');
this code checks for the session existence
$session = new CGI::Session(undef, $sid, {Directory=>'/tmp'});
print $query->header( -cookie=>$cookie );
$username_session = $session->param('username');
if ($username_session eq "") {
&print_session_exp_header(" -- Session Expired -- ","Session
Expired.");
print "<h5>Please Relogin in Different Browser</h5>";
&print_trailer();
exit(0);
}
i dont know where i m going wrong.
can anyone plz correct with i have done any mistake or pointer to
correct the mistake.
thaks in advance
prakash