in reply to Cookie Problems
I'm afraid I don't understand your code at all. If you already know the session ID, why are you passing that to $query->cookie()? I also don't believe that retrieveSession() works at all; you have a prototype mismatch that I'd expect to throw warnings, at least.
If you rewrite the function more like this:
sub retrieveSession { my ($query) = @_; my $sid = $query->cookie('CGISESSID') || ''; $sid = substr($sid, 10, -8); my $session = CGI::Session->new(undef, $sid, {Directory=>'/tmp/Ses +sions'}); return getUser($session, $sid); }
... does it work better?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Cookie Problems
by intranetman (Acolyte) on Sep 29, 2004 at 21:09 UTC | |
by geekgrrl (Pilgrim) on Sep 29, 2004 at 22:09 UTC | |
by intranetman (Acolyte) on Sep 30, 2004 at 16:40 UTC | |
by chromatic (Archbishop) on Sep 30, 2004 at 17:58 UTC | |
by intranetman (Acolyte) on Sep 30, 2004 at 19:04 UTC | |
by geekgrrl (Pilgrim) on Sep 30, 2004 at 19:22 UTC | |
by intranetman (Acolyte) on Oct 05, 2004 at 17:17 UTC |