You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Xavier Noria <fx...@hashref.com> on 2003/09/01 19:25:16 UTC

Apache::Session and pnotes

I am trying to retrieve/create an Apache::Session object for a given 
user in the authentication phase, so the following handlers have them 
available via pnotes. Sessions are stored in an Oracle database.

It seems, however, that Apache::Session objects stop being stored when I 
put the session in pnotes() with a code analogous to this:

    my $r = Apache::Request->instance(shift);
    
    tie my (%session), 'Apache::Session::Oracle', undef,
      {Handle => $class->dbh(), Commit => 1};
    
    $r->pnotes(session => \%session);

Is there any gotcha regarding the kind of objects that can be passed 
with pnotes? Or do you know what can be happening anyway if not?

-- fxn



-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Re: Apache::Session and pnotes

Posted by Perrin Harkins <pe...@elem.com>.
Xavier Noria wrote:
> 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?

>     my $r = Apache::Request->instance(shift);

No need to involve Apache::Request just for this.  Your handler should 
be getting $r passed to it.

>     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.

- Perrin



-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html