[ Please keep replies on the mailing list ] On Wed, 2006-08-30 at 09:29 -0400, dhaval gada wrote:
> If its the 1st time... then the following code. (i.e. session > creation) > > [- > eval { > tie %session, 'Apache::Session::File', undef, > { Directory => './tmp/sessions', > LockDirectory => './var/lock/sessions', > }; > }; > if ($@) { > die "Global data is not accessible: $@"; > } > > $session{"manpage"} = new BFM::ManPage(); > $session{"visit"} = '1 all'; > $tp = yes; > > my $session_cookie = "SESSION_ID=$session{_session_id};"; > $r->header_out("Set-Cookie" => $session_cookie); > -] Okay, and you said that seemed to work. I'd be nervous about your use of relative directories in those path names, personally. > And if not the 1st time... then the following code.(i.e. retrieving > established session) > [- > $r = Apache ->request; > $cookie = $ r->header_in('Cookie'); > $ cookie =~ s/SESSION_ID=(\w*)/$1/; > > eval { tie %session , 'Apache::Session::File', $cookie, > { Directory => './tmp/sessions', > LockDirectory => './var/lock/sessions', > }; > }; > > if ($@) > { die "Global data is not accessible: $@"; } > -] And that's where it dies on you? Have you checked the value of $cookie inside that eval? Maybe it isn't what you think it is. - Perrin