in reply to Re^4: Cookie->fetch problem
in thread Cookie->fetch problem
Hi:
The problem is in the tiny isolated subroutine below. This code is from cookie.pm
sub GetUserSessionCookie { warn("Entered GetUserSessionCookie Sessionname: '$sessionname'"); + # fetch existing cookies from cookie.pm CGI::Cookie - Interface to + HTTP Cookies my %cookies = CGI::Cookie->fetch; my $id = $cookies{'ID'}->value; my $sid = $id; warn($sid); $sid = 0; #for testing the rest of program. If I put in valid SI +D from #cookie recognizes user as logged on. return $sid; }
The error returned:
Can't call method "value" on an undefined value at /home/jalamior/www/httpsdocs/cgi-bin/lib/perl/manageusers.pm line 674.
Is that error because there is no cookie->id string recovered by the call or a problem with the call itself?
When I log in to https://www.jala-mi.org/httpsdocs/index.html
Firebug cookies shows
CGISESSID=16c11ce44ef8ffcfe6a5f0d74e4e0860; expires=Sun, 19 Mar 2017 00:47:22 GMT; path=/cgi-bin; domain=.www.jala-mi.org; Secure
Opening the edit dialog under Firebug shows cookies.edit.expire.label as the date/time the cookie was created and when I click Ok, the cookie disappears.
Log in again and new cookie with new date/time of creation in Firebug.
Don't know what this is.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Cookie->fetch problem
by huck (Prior) on Mar 12, 2017 at 01:42 UTC | |
by tultalk (Monk) on Mar 12, 2017 at 03:35 UTC | |
by tultalk (Monk) on Mar 12, 2017 at 03:59 UTC | |
by tultalk (Monk) on Mar 12, 2017 at 04:58 UTC | |
by huck (Prior) on Mar 12, 2017 at 05:12 UTC | |
by tultalk (Monk) on Mar 12, 2017 at 12:57 UTC | |
by Anonymous Monk on Mar 12, 2017 at 05:49 UTC | |
by tultalk (Monk) on Mar 12, 2017 at 12:49 UTC |