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 Istore 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
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 [EMAIL PROTECTED] Date 31 October 2000 To [EMAIL PROTECTED] 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 Hi everyone, I'm sure this is a simple problem... Im using Session.pm to track information between httpd requests. However, when Istore 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.
[Fwd: Session data disappearing]
I read that in the manual, but was a little unsure of what it meant. I understand the concept just not how to implement it. Right now I'm just storing a variable in the hash.. For example... $hash{test} = "test"; Then if I look at the variable from another script (or the same script) it's just not there. [EMAIL PROTECTED] 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 [EMAIL PROTECTED] Date 31 October 2000 To [EMAIL PROTECTED] 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 Name: att1.htm att1.htm Type: Hypertext Markup Language (text/html) Encoding: base64 Description: Internet HTML __ 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.
Re: Session data disappearing
That should work as far as I know, it sounds like it is not being tied correctly to your store. Can you post your code to the list ? SW From cbell [EMAIL PROTECTED] Date 31 October 2000 To Simon Wilcox/BASE/WilliamsLea@WilliamsLea Time 17:58 Copy to Bcc Fax to Subject Re: Session data disappearing I read that in the manual, but was a little unsure of what it meant. I understand the concept just not how to implement it. Right now I'm just storing a variable in the hash.. For example... $hash{test} = "test"; Then if I look at the variable from another script (or the same script) it's just not there. [EMAIL PROTECTED] 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 [EMAIL PROTECTED] Date 31 October 2000 To [EMAIL PROTECTED] 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 Name: att1.htm att1.htm Type: Hypertext Markup Language (text/html) Encoding: base64 Description: Internet HTML __ 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. __ 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.
Session data disappearing
I deleted the Sessions database and recreated it in Postgres and now the session data is staying!!