Bug #17625 [Fbk->Bgs]: After expiry no session data can be written

From: Date: Tue, 26 Oct 2010 01:37:08 +0000
Subject: Bug #17625 [Fbk->Bgs]: After expiry no session data can be written
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-4984@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=17625&edit=1 ID: 17625 Updated by: till@php.net Reported By: bernhard dot mayer dot hh at gmail dot com Summary: After expiry no session data can be written -Status: Feedback +Status: Bogus Type: Bug Package: HTTP_Session2 Operating System: Win7 Package Version: 0.7.3 PHP Version: 5.3.1 Assigned To: till Roadmap Versions: New Comment: -Status: Feedback +Status: Bogus Sorry, but your problem does not imply a bug in PEAR itself. For a list of more appropriate places to ask for help using PEAR, please visit http://pear.php.net/support/ as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PEAR. The idea is - when a session expired it's gone. You need to configure the garbage collector and then the record vanishes. It's expected behavior that a session which expired cannot be updated anymore through the session handler. Previous Comments: ------------------------------------------------------------------------ [2010-08-05 13:40:42] mckenna A new bug is opened for the query vs exec stuff. Any idea whats the problem and how to fix it? ------------------------------------------------------------------------ [2010-07-31 22:54:04] till -Status: Bogus +Status: Feedback Can you open a separate issue for query() vs. exec() - with a patch if possible. I'll think about your other issue, I need a fresh set of eyes on this. ------------------------------------------------------------------------ [2010-07-30 11:57:53] mckenna Still one of the problem resists. The Session seems to be expired, but the module can't update the record. here is some logging: 13:43:40 Open... 13:43:40 Connect... 13:43:40 Read... SELECT data FROM session WHERE id = 'b38aa7b96aff956da71878556f6eea42' AND expiry >= 1280490220 Result: Empty result... 13:43:40 Update Idle... 13:43:40 Write... 13:43:40 Check... SELECT COUNT(id) FROM session WHERE id = 'b38aa7b96aff956da71878556f6eea42' 13:43:40 Update... UPDATE session SET expiry = 1280491660, data = '...' AND expiry >= 1280490220 Affected Rows: 0 13:43:40 Close... The database field expiry has the value 1280490046 for this record. As you can see the read method didn't found the record and result in a empty session. The write method checks for the session, found it and tries to update it, but can't update it. I don't know why this happens, but this is the core problem of all my problems. btw the write method at line ~258 should use the exec method of mdb2. currently it uses the query method. this way you can't see the affected rows. and the statements are only inserts or updates at this point. ------------------------------------------------------------------------ [2010-07-29 07:13:12] mckenna Ok, thanks for your explanation. That helped and i figured something out that was my misstake. I used the pause function to update the session data, i thought. but pause wrote the data and closed the db connection. And i used pause in my code before i called updateidle. So the session was always idle after the idle time from the session start. That was one of my problems and the gc functions cleared some of the rest. Thanks! ------------------------------------------------------------------------ [2010-07-28 16:04:47] till -Status: Assigned +Status: Bogus Thank you for taking the time to write to us, but this is not a bug. Btw, I totally agree - this could be better documented. If you have the urge to contribute something, let me know. Feel free to re-open with some info, or whatever. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://pear.php.net/bugs/bug.php?id=17625 -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=17625&edit=1

« previous php.pear.bugs (#4984) next »