Re: Apache::Session not updating session
On Tue, 14 Aug 2001 00:27:28 -0700 Michael A Nachbaur [EMAIL PROTECTED] wrote: I'm using Apache::Session::File, and am setting a cookie for my sessionid, and my code is currently running in plain-old CGI mode (one of the libraries I'm using keeps segfaulting under mod_perl for some strange reason). When I visit the CGI, it successfully creates the session file in the /tmp directory, and all subsequent accesses to the page successfully load the session information from the right file on disk. However, my problem is that any value I set in my session is never updated on disk. I have tried explicitly calling tied(%session)-save and delete, to no avail. Can I have a look at snippet of your code, please? Well, this doc (from Apache::Session) may help you, though I don't know this is the case. Note that Apache::Session does only a shallow check to see if anything has changed. If nothing changes in the top level tied hash, the data will not be updated in the back- ing store. You are encouraged to timestamp the session hash so that it is sure to be updated. -- Tatsuhiko Miyagawamod_perl Mailing List mailto:[EMAIL PROTECTED] http://bulknews.net/lib/ml/
Re: Apache::Session not updating session
Hello Michael A Nachbaur, Tuesday, August 14, 2001, 12:27:28 PM, you wrote: MAN I really hope this isn't a FAQ, but I've lost more hair over this problem MAN than I really should have, which is why I'm here. MAN I'm using Apache::Session::File, and am setting a cookie for my sessionid, MAN and my code is currently running in plain-old CGI mode (one of the libraries MAN I'm using keeps segfaulting under mod_perl for some strange reason). When I MAN visit the CGI, it successfully creates the session file in the /tmp MAN directory, and all subsequent accesses to the page successfully load the MAN session information from the right file on disk. However, my problem is MAN that any value I set in my session is never updated on disk. I have tried MAN explicitly calling tied(%session)-save and delete, to no avail. MAN Permissions look good, the disk isn't full, and obviously it was able to MAN access the disk in the first place since it was able to write the session MAN file to disk. MAN I'm about to go crazy here, since my application is working with the MAN exception of this crucial piece. Any help anyone can provide would be MAN greatly appreciated. MAN System config: MAN Redhat 7.1, with stock Apache/mod_perl RPMs. MAN Stock RH7.1 Perl. MAN Apache::Session v1.53 MAN -man MAN Michael A Nachbaur On which level of session data you are changing ? from perldoc Apache::Session [snip] Note that Apache::Session does only a shallow check to see if anything has changed. If nothing changes in the top level tied hash, the data will not be updated in the backing store. You are encouraged to timestamp the session hash so that it is sure to be updated. [snip] may be this help you -- WBR, Mike P. Mikhailov mailto:[EMAIL PROTECTED]
Re: Apache::Session not updating session
At 03:27 AM 8/14/01, Michael A Nachbaur wrote: I'm using Apache::Session::File, and am setting a cookie for my sessionid, and my code is currently running in plain-old CGI mode (one of the libraries I'm using keeps segfaulting under mod_perl for some strange reason). When I visit the CGI, it successfully creates the session file in the /tmp directory, and all subsequent accesses to the page successfully load the session information from the right file on disk. However, my problem is that any value I set in my session is never updated on disk. I have tried explicitly calling tied(%session)-save and delete, to no avail. Permissions look good, the disk isn't full, and obviously it was able to access the disk in the first place since it was able to write the session file to disk. Isn't that what tied(%session)-make_modifed; is for? Todd
Re: Apache::Session not updating session
On Tue, 14 Aug 2001, Todd Finney wrote: Isn't that what tied(%session)-make_modifed; is for? Yep.
Re: Apache::Session not updating session
At 11:07 AM 8/14/01, Jeffrey W. Baker wrote: On Tue, 14 Aug 2001, Todd Finney wrote: Isn't that what tied(%session)-make_modifed; is for? Yep. Perhaps it might be a good idea to mention it in the Apache::Session perldoc. I'm using 1.5mumble, and there's no word of it there. cheers, Todd
RE: Apache::Session not updating session
-Original Message- From: Todd Finney [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 14, 2001 11:19 AM To: [EMAIL PROTECTED] Subject: Re: Apache::Session not updating session At 11:07 AM 8/14/01, Jeffrey W. Baker wrote: On Tue, 14 Aug 2001, Todd Finney wrote: Isn't that what tied(%session)-make_modifed; is for? Yep. Perhaps it might be a good idea to mention it in the Apache::Session perldoc. I'm using 1.5mumble, and there's no word of it there. actually, the sources make it sound like this and related make_* methods can go away at any time. --Geoff
RE: Apache::Session not updating session
At 11:39 AM 8/14/01, Geoffrey Young wrote: -Original Message- From: Todd Finney [mailto:[EMAIL PROTECTED]] Subject: Re: Apache::Session not updating session At 11:07 AM 8/14/01, Jeffrey W. Baker wrote: On Tue, 14 Aug 2001, Todd Finney wrote: Isn't that what tied(%session)-make_modifed; is for? Yep. Perhaps it might be a good idea to mention it in the Apache::Session perldoc. I'm using 1.5mumble, and there's no word of it there. actually, the sources make it sound like this and related make_* methods can go away at any time. Yes, though I don't know how serious that threat is with this particular method. Jeff would really be the one to ask. Coding around its removal wouldn't really be that difficult, anyway. cheers, Todd
Re: Apache::Session not updating session
Okay, thank you all for your suggestions. It was the deep modifications that were killing me. I just did a handy-dandy: $session{timestamp} = time; and that fixed everything. -man Michael A Nachbaur