[Cgi-session-user] [Fwd: CGI::Session Module problem with load()]
Brought to you by:
sherzodr
From: Mark S. <ma...@su...> - 2006-11-10 21:05:54
|
This question is being forwarded to the CGI::Session users list for peer-support. Mark -------- Original Message -------- Subject: CGI::Session Module problem with load() Date: Fri, 10 Nov 2006 17:21:22 +0100 From: Florian Kristen <Flo...@mi...> To: mrb...@ma... CC: dr...@sh..., ad...@sy..., ig...@pl..., mar...@cp..., mle...@cp... Hello, the module is greate and i'm happy about this yousfull module but i need the funktion load to as the sample of the Mainpage. I must story some data in the cgisession_file and if i cal new i't doesend store it. if i call load it store it and i can work with te vcariable. so now the problem is: first time i have done it as like the sample: $s = CGI::Session->load() or die CGI::Session->errstr(); if ( $s->is_expired ) { print $s->header(), $cgi->start_html(), $cgi->p("Your session timed out! Refresh the screen to start new session!") $cgi->end_html(); exit(0); } if ( $s->is_empty ) { $s = $s->new() or die $s->errstr; } but it have no effekt. Everybody can browse the site without login. if i change $s->new() to CGI::Session->new() it works as it shout but after load() $s->is_expired returns every time 0! and every time i must relogin and can click one time. the module works greate, on other systems but ther i don't need load() after session generateted and no additional session vars. have anyone a idee where i make the failer? one importent think we have, that the $session objekt shout be transfer to other perl objects. we need to get the username so: sub getUsername { my $self = shift; my $session = CGI::Session->load; return $session->param( 'login_name' ); } So i hope you can help me. thanks greets Florian Kristen -- . . . . . . . . . . . . . . . . . . . . . . . . . . . Mark Stosberg Principal Developer ma...@su... Summersault, LLC 765-939-9301 ext 202 database driven websites . . . . . http://www.summersault.com/ . . . . . . . . |