Edit report at https://bugs.php.net/bug.php?id=68331&edit=1
ID: 68331
Updated by: yohgaki@php.net
Reported by: mark at grooveshark dot com
Summary: Session custom storage callable functions not being
called
-Status: Assigned
+Status: Closed
Type: Bug
Package: Session related
Operating System: All
PHP Version: 5.6.2
Assigned To: yohgaki
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of yohgaki
Revision: http://git.php.net/?p=php-src.git;a=commit;h=4dd3fbfcd28f8a3826361c5c4b7aa4c4da592b22
Log: Fixed bug #68331 - This was partial patch for https://wiki.php.net/rfc/session-lock-ini
Previous Comments:
------------------------------------------------------------------------
[2014-11-06 03:28:51] yohgaki@php.net
I found what's wrong. Since lazy write patch was in discussion and I left WIP patch in the repo
and left this patch merge to RM. This must be addressed ASAP.
------------------------------------------------------------------------
[2014-11-06 03:11:56] yohgaki@php.net
Hmm. The commit you're referring is nothing to do with you issue. It was reverted and new PR is
there for this. (It seems should be adjusted and committed)
https://github.com/yohgaki/php-src/compare/PHP-5.6-rfc-session-lock
It isn't merged yet. So lazy write patch is unrelated at all.
I've tried see if issue could be reproduced, but it cannot.
Could you write full/working reproducible script?
------------------------------------------------------------------------
[2014-11-05 22:25:52] yohgaki@php.net
Since your are using user save handler, I think this could be fixed as a bug. I have to check the
code to be sure, though.
------------------------------------------------------------------------
[2014-11-05 21:39:36] mark at grooveshark dot com
> I don't understand the reason why you need "write" even when session data was
> not changed at all.
Two reasons I brought up on the internals thread:
- We would like to update the timestamp of the session.
- We have some data that isn't in $_SESSION that needs to be written. We don't use
$_SESSION because we need the data to be indexable (not serialized) and didn't want to
duplicate the data in two places.
> BTW, I was suggesting "update" handler for the RFC introduce this feature, but there
> were objection and withdrawned.
I'm unaware of the full objection to that idea; however, I think calling the write() custom
handlers until an alternative is implemented would suffice to fix this issue. I understand that
doing the lazy write call was an optimization for normal sessions but this change can break some
custom session implementations.
> I may try to add user space "update" again.
Based on what was said on the internals thread it sounds like this isn't an option for PHP 5.6.
I assume you mean something can be done for 5.7 and for PHP 5.6 the commit will just have to be
reverted?
------------------------------------------------------------------------
[2014-11-05 21:20:16] yohgaki@php.net
I don't understand the reason why you need "write" even when session data was not
changed at all.
BTW, I was suggesting "update" handler for the RFC introduce this feature, but there were
objection and withdrawned.
I may try to add user space "update" again.
------------------------------------------------------------------------
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
https://bugs.php.net/bug.php?id=68331
--
Edit this bug report at https://bugs.php.net/bug.php?id=68331&edit=1