Loading ...
Sorry, an error occurred while loading the content.

Re: Apache::Session and pnotes

Expand Messages
  • Xavier Noria
    ... I am sorry, I ll try to reword it. Let s assume a new user comes to the website. We set up a session for him and put the session id in a cookie to be sent
    Message 1 of 7 , Sep 2, 2003
    • 0 Attachment
      On Tuesday 02 September 2003 07:28, Perrin Harkins wrote:

      > Sorry, I don't understand what you're saying here. What you should
      > be doing is fetching the session once, putting it in pnotes, and
      > getting it from pnotes for the rest of the request.

      I am sorry, I'll try to reword it.

      Let's assume a new user comes to the website. We set up a session for
      him and put the session id in a cookie to be sent in the response. As
      you know, somewhere in the request cycle of that particular request
      Apache::Session::Oracle stores the session in the database.

      When later that very user comes back to the website with a valid session
      id in the cookie, one reads the session from the database.

      The problem I am facing is that if the session is stored in pnotes() it
      doesn't end up in the database. When the user comes back that id
      corresponds to no row in the sessions table.

      Is it better now?

      -- fxn




      --
      Reporting bugs: http://perl.apache.org/bugs/
      Mail list info: http://perl.apache.org/maillist/modperl.html
    • Enrico Sorcinelli
      On Tue, 2 Sep 2003 20:21:45 +0200 ... Hi Xavier, If you want a transaparent session management you could also look Apache::SessionManager mod_perl extension.
      Message 2 of 7 , Sep 5, 2003
      • 0 Attachment
        On Tue, 2 Sep 2003 20:21:45 +0200
        Xavier Noria <fxn@...> wrote:

        > On Tuesday 02 September 2003 07:28, Perrin Harkins wrote:
        >
        > > Sorry, I don't understand what you're saying here. What you should
        > > be doing is fetching the session once, putting it in pnotes, and
        > > getting it from pnotes for the rest of the request.
        >
        > I am sorry, I'll try to reword it.
        >
        > Let's assume a new user comes to the website. We set up a session for
        > him and put the session id in a cookie to be sent in the response. As
        > you know, somewhere in the request cycle of that particular request
        > Apache::Session::Oracle stores the session in the database.
        >
        > When later that very user comes back to the website with a valid session
        > id in the cookie, one reads the session from the database.
        >
        > The problem I am facing is that if the session is stored in pnotes() it
        > doesn't end up in the database. When the user comes back that id
        > corresponds to no row in the sessions table.
        >

        Hi Xavier,

        If you want a transaparent session management you could also look Apache::SessionManager
        mod_perl extension. No extra code to write but a few lines to add in httpd.conf or
        .htaccess.file

        :-)

        by

        - Enrico


        --
        Reporting bugs: http://perl.apache.org/bugs/
        Mail list info: http://perl.apache.org/maillist/modperl.html
      • Perrin Harkins
        Sorry, I missed this message until now... ... It happens when the session object gets destroyed. ... Okay, the problem is not pnotes. The pnotes stuff gets
        Message 3 of 7 , Sep 5, 2003
        • 0 Attachment
          Sorry, I missed this message until now...

          On Tue, 2003-09-02 at 14:21, Xavier Noria wrote:
          > Let's assume a new user comes to the website. We set up a session for
          > him and put the session id in a cookie to be sent in the response. As
          > you know, somewhere in the request cycle of that particular request
          > Apache::Session::Oracle stores the session in the database.

          It happens when the session object gets destroyed.

          > The problem I am facing is that if the session is stored in pnotes() it
          > doesn't end up in the database. When the user comes back that id
          > corresponds to no row in the sessions table.

          Okay, the problem is not pnotes. The pnotes stuff gets cleared at the
          end of every request, so it would save then, after the user
          disconnects. Probably what's happening is that you have a scoping
          problem somewhere in your code that deals with pnotes and it is keeping
          the session object from going out of scope.

          One thing you can try is explicitly saving the session, using the method
          described in the Apache::Session documentation. If that works, it means
          you just have to find your scoping problem. Maybe you can locate it by
          removing code bit by bit until the problem goes away. If you can make a
          very short script that demonstrates the problem, you can post it here
          and we'll help you find it.

          - Perrin


          --
          Reporting bugs: http://perl.apache.org/bugs/
          Mail list info: http://perl.apache.org/maillist/modperl.html
        Your message has been successfully submitted and would be delivered to recipients shortly.