On Tuesday 02 September 2003 07:46, you wrote: (I am sorry I am not replying to the actual email, but to a forwarded copy from my desktop at home.)
> > It seems, however, that Apache::Session objects stop being stored > > when I put the session in pnotes() with a code analogous to this: > > Can you tell us more about the problem is? What do you see when you > take the session hash back out of pnotes? I have dumped the hash in a content handler and it seems to be OK. > > my $r = Apache::Request->instance(shift); > > No need to involve Apache::Request just for this. Your handler > should be getting $r passed to it. Apache::Request is used because the authenticator handles login via param(), and more handlers need the parameters afterwards. > > tie my (%session), 'Apache::Session::Oracle', undef, > > {Handle => $class->dbh(), Commit => 1}; > > > > $r->pnotes(session => \%session); > > Show us the code you use to get it back. When a request is received the session id is retrieved from a cookie. The schema (with some irrelevant checks removed) would be this: my %cookies = Apache::Cookie->fetch; my $cookie = $cookies{COOKIE_NAME()}; my $session_id = $cookie->value; my %session; eval { tie %session, 'Apache::Session::Oracle', $session_id, {Handle => $class->dbh(), Commit => 1}; }; The eval block is there now because it seems Apache::Session::Oracle dies if it cannot retrieve the session. That code works all right if \%session is not stored in pnotes(), but if it is put the session is not read back from the database and I have checked from a database client that there is no new row written. I am doing basic stuff with this, so if it sounds strange it is likely that I doing something wrong. -- fxn -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html