adrive has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl print "content-type: text/html \n\n"; use CGI; use CGI::Session qw/-ip-match/; use File::Spec; # my $session = new CGI::Session("driver:File", undef, {Directory=>Fil +e::Spec->tmpdir}); my $session = new CGI::Session(); my $sessionid = $session->id(); print "<BODY>"; print " <FORM ACTION=\"testsession2.pl\">"; print "<INPUT TYPE=\"hidden\" NAME=sessionid VALUE=" . $sessionid . "/ +>"; print "current session : " . $sessionid; print "<INPUT TYPE=\"SUBMIT\" VALUE=\"go next\">"; print "</FORM>"; print "</BODY>";
#!/usr/bin/perl print "content-type: text/html \n\n"; use CGI; use CGI::Session qw/-ip-match/; my $cgi = new CGI; my $sessionid = $cgi->param("sessionid"); print "current session id ($sessionid)"; my $session = CGI::Session->load($sessionid); if(!$session->is_empty()){ print "<BODY>"; print " <FORM ACTION=\"testsession.pl\">"; print "<br><br>found session object from sessionid : " . $session- +>id(); print "<INPUT TYPE=\"SUBMIT\" VALUE=\"back\">"; print "</FORM>"; print "</BODY>"; }else{ print "<BODY>"; print " <br><br>weird enough...session object is lost!"; print "</BODY>"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: CGI::Session not saving with IIS
by moritz (Cardinal) on Mar 11, 2008 at 09:53 UTC | |
|
Re: CGI::Session not saving with IIS
by adrive (Scribe) on Mar 11, 2008 at 12:05 UTC | |
by moritz (Cardinal) on Mar 11, 2008 at 13:25 UTC | |
by adrive (Scribe) on Mar 11, 2008 at 13:42 UTC | |
by Anonymous Monk on Feb 19, 2009 at 16:18 UTC |