digger has asked for the wisdom of the Perl Monks concerning the following question:
1. If I don't use CGI::Cookie explicitly and then create my cookie using it's methods directly, I never even get a cookie. The CGI.pm cookie method doesn't throw any errors, I just don't get a cookie. I installed the latest version of CGI.pm in my local lib, and no luck. I have Super Searched and Googled to no avail.use lib ('path/to/my/lib'); use strict; use CGI qw(:standard); use CGI::Carp('fatalsToBrowser'); use Win32::ODBC; use CGI::Session; my $q = new CGI; my $session = new CGI::Session("driver:File", $q, {Directory=>'..\sess +ions'}); ---do db search---- if ($found) { $session->param("name", $memb_name); #set a cookie my $cookie = $q->cookie(-name =>'member', -value =>'test', -domain =>'.relationshiphelp.org', -expires =>"+3h", CGISESSID =>$session->id); print $q->header(-cookie=>$cookie); print $session->param("name")."<br>"; print "Found your user id <br>"; print $session->id; return 1; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: CGI.pm, CGI::Session and Cookies
by jdtoronto (Prior) on Feb 09, 2004 at 20:55 UTC | |
by digger (Friar) on Feb 09, 2004 at 21:06 UTC | |
by jdtoronto (Prior) on Feb 09, 2004 at 21:42 UTC | |
by digger (Friar) on Feb 09, 2004 at 22:30 UTC | |
by jdtoronto (Prior) on Feb 10, 2004 at 00:50 UTC | |
|