You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Si...@williamslea.com on 2000/10/31 17:35:57 UTC

Re: Session data disappearing

Hi Chris, welcome on board !

      Are you changing data structures e.g. a element in a hash of hashes ?

      Apache::Session has documented behaviour where it only writes back changes
      if the top level variables have changed. If you are changing something
      deeper it will not be _seen_ as a change.

      The recommended approach is to use a timestamp at the top level to ensure
      that something always changes and forces a write.

      Simon Wilcox.






               From           cbell <cb...@lighthouseasp.com>              Date
   31 October 2000
                                                                            
                                                                            
        To                                                                  
                modperl@apache.org                          Time  17:30     
                                                                            


      Copy to         (bcc: Simon Wilcox/BASE/WilliamsLea)



      Bcc     Simon Wilcox/BASE/WilliamsLea



      Fax to



      Subject       Session data disappearing





Hi everyone, I'm sure this is a simple problem...

Im using Session.pm to track information between httpd requests.
However, when I store some information in the session, it is gone when I
try to retrieve it later.  I've noticed the following things:

when I tie to the session I use the command Commit = 1, but in my
error_log, I get the following...
Commit ineffective with AutoCommit enabled at
/usr/lib/perl5/site_perl/5.005/Apache/Session/Store/Postgres.pm line 92

Then I turned AutoCommit off on my database connection but then I could
see in my error_log that the commands were being rolled back.

I'll try committing the changes to the database next, but then what's
the point of the Commit = 1 command in the Tie command?? The
documentation states it has to be like this. Does anyone know what the
proper way of doing this is?

Also, thanks to all who replied to my last post!!!  As you can see I'm
now up and running with Mod_perl!!!!

Chris


Re: Session data disappearing

Posted by Gunther Birznieks <gu...@extropia.com>.
By the way, as an alternative suggestion, don't use postgres... use 
Session::File. I seem to recall that Postgres isn't the zippiest medium for 
storing sessions. It turns out plain files are pretty fast for small sets 
of blob data.

At 04:35 PM 10/31/00 +0000, Simon_Wilcox@williamslea.com wrote:

>Hi Chris, welcome on board !
>
>       Are you changing data structures e.g. a element in a hash of hashes ?
>
>       Apache::Session has documented behaviour where it only writes back 
> changes
>       if the top level variables have changed. If you are changing something
>       deeper it will not be _seen_ as a change.
>
>       The recommended approach is to use a timestamp at the top level to 
> ensure
>       that something always changes and forces a write.
>
>       Simon Wilcox.
>
>
>
>
>
>
>                From           cbell 
> <cb...@lighthouseasp.com>              Date
>    31 October 2000
>
>
>         To
>                 modperl@apache.org                          Time  17:30
>
>
>
>       Copy to         (bcc: Simon Wilcox/BASE/WilliamsLea)
>
>
>
>       Bcc     Simon Wilcox/BASE/WilliamsLea
>
>
>
>       Fax to
>
>
>
>       Subject       Session data disappearing
>
>
>
>
>
>Hi everyone, I'm sure this is a simple problem...
>
>Im using Session.pm to track information between httpd requests.
>However, when I store some information in the session, it is gone when I
>try to retrieve it later.  I've noticed the following things:
>
>when I tie to the session I use the command Commit = 1, but in my
>error_log, I get the following...
>Commit ineffective with AutoCommit enabled at
>/usr/lib/perl5/site_perl/5.005/Apache/Session/Store/Postgres.pm line 92
>
>Then I turned AutoCommit off on my database connection but then I could
>see in my error_log that the commands were being rolled back.
>
>I'll try committing the changes to the database next, but then what's
>the point of the Commit = 1 command in the Tie command?? The
>documentation states it has to be like this. Does anyone know what the
>proper way of doing this is?
>
>Also, thanks to all who replied to my last post!!!  As you can see I'm
>now up and running with Mod_perl!!!!
>
>Chris
>
>
>
>
>
>
>
>
>
>
>
>
>______________________________________________________________________
>
>
>    This email contains proprietary information some or all of which may be
>    legally privileged.  It is for the intended recipient only. If an 
> addressing
>    or transmission error has misdirected this email, please notify the 
> author by
>    replying to this email. If you are not the intended recipient you must not
>    use, disclose, distribute, copy, print, or reply on this email.

__________________________________________________
Gunther Birznieks (gunther.birznieks@extropia.com)
eXtropia - The Web Technology Company
http://www.extropia.com/