F
Francesco
Hi,
I'm in trouble with a CGI script : I use CGI:Session for the session
management, my problem is that sometimes the script lost the session ID
and so create a new session.
The problem occurs everytime I run the script from a computer behind a
proxy (the script is on a website) and occasionally when the pc is
connected directly to internet (or is inside the LAN of the webserver).
The script structure is quite simple, at top of the script I call
a sub for the session management, then I load a sub for the page
requested.
The first page contains the login form (an hidden field contains the
session ID), then I create a frameset with 3 frames.
I print in each frame the session ID and is (sometimes/everytime)
different.
I suppose that the problem is in the session management, this is my
routine :
sub session_manage {
#my $sid = $CGI::Q->param('CGISESSID') || $CGI::Q->url_param('CGISESSID')
|| undef;
my $sid = $CGI::Q->param('CGISESSID'); $session = new
CGI::Session("driver:File",$sid, {Directory=>'/tmp'});
$session->save_param( $CGI::Q);
$session->expire(600); # expire after 600 seconds $ParID =
"?CGISESSID=".$session->id;
}
Is there something wrong ?
Francesco
Freedev.it
I'm in trouble with a CGI script : I use CGI:Session for the session
management, my problem is that sometimes the script lost the session ID
and so create a new session.
The problem occurs everytime I run the script from a computer behind a
proxy (the script is on a website) and occasionally when the pc is
connected directly to internet (or is inside the LAN of the webserver).
The script structure is quite simple, at top of the script I call
a sub for the session management, then I load a sub for the page
requested.
The first page contains the login form (an hidden field contains the
session ID), then I create a frameset with 3 frames.
I print in each frame the session ID and is (sometimes/everytime)
different.
I suppose that the problem is in the session management, this is my
routine :
sub session_manage {
#my $sid = $CGI::Q->param('CGISESSID') || $CGI::Q->url_param('CGISESSID')
|| undef;
my $sid = $CGI::Q->param('CGISESSID'); $session = new
CGI::Session("driver:File",$sid, {Directory=>'/tmp'});
$session->save_param( $CGI::Q);
$session->expire(600); # expire after 600 seconds $ParID =
"?CGISESSID=".$session->id;
}
Is there something wrong ?
Francesco
Freedev.it