Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I read some threads in this website, and it says you must specify a domain name for your cookie? But how come the documentation for the CGI::Session and other examples I have looked at do not say anything about that? I made sure my browser accepts cookies and have looked inside the cookie folder for any cookie named "SESSION_Name" and no luck. What Am I doing wrong? Is it something to do with the code I have or just a config. that I'm not understanding?#created the INPUT = New CGI; on previous lines use CGI::Session; my $session = new CGI::Session("driver:MySQL", undef, { Handle => $dbh, DataSource => "DBI:mysql:contrarian:host=my_server", User => "srjiii", Password => $df_pass }); $session->param("member_name", $username); my $cookie = $INPUT->cookie(-name=>'SESSION_Name', -value=>$session->id, -expires=>"+1d"); print $INPUT->header(-cookie=>$cookie);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Troubleshooting Setting a Cookie
by BaldPenguin (Friar) on Jun 13, 2005 at 06:13 UTC | |
|
Re: Troubleshooting Setting a Cookie
by inman (Curate) on Jun 13, 2005 at 07:49 UTC |