Alright, here's my problem --I try to use CGI::Session->load($cgi) to grab a session I've already created in a different page.Basically, I have a login page that upon a successful login will create a session and bake a cookie like so:$session = new CGI::Session(undef, undef, {Directory=>'/tmp'});print $session->header();This writes a new file to /tmp to keep track of the session. I can see these files being created, they're all named cgisess_* (where * is the session id). They all have lrwx permissions across the board (anybody can open them to dink around).Now here's my problem --I have a little test page which tries to pull the cookie from the user and grab the session from disk.$session = CGI::Session->load($cgi);When I pull the cookie out like so manually:$session_id = $cgi->cookie('CGISESSID'); it gives me the same session_id that I sent back to the browser (my login page prints this to screen so I could verify it).So now I'm sitting here staring at the file on disk which has cgisess_<the session id i'm looking at> and CGI::Session->load($cgi) still gives me back a blank session.Any ideas why the fuck it won't find the session in /tmp and load it properly? Any advice would be appreciated.
9/9/2005 11:05:58 AM
You explicitly delcared /tmp as your directory when you wrote the session. Perhaps it will help to do so when you load it as well:$session = CGI::Session->load(undef, $cgi, {Directory=>'/tmp'});That's the only thing that looks obvious to me.
9/9/2005 7:08:08 PM
Shit still isn't working.Technically you can call load without any parameters and it'll look around for 'CGISESSID' in the cookie, then the query string.
9/10/2005 1:24:53 PM
try print $ENV{HTTP_COOKIE};somewhere in there and make sure your script is receiving the cookie from the browser. Could be a problem with CGI::Session guessing what your host name is when it sets the cookie.
9/12/2005 10:27:50 AM