Bug #68331 [NEW]: Session custom storage callable functions not being called
From: mark at grooveshark dot com
Operating system: All
PHP version: 5.6.2
Package: Session related
Bug Type: Bug
Bug description:Session custom storage callable functions not being called
Description:
------------
Call to write are not being triggered when setting up custom handlers
for sessions using session_set_save_handler if the underlying session
data hasn't changed. It looks like this has been done by design for
regular session handling but was calls were suppose to happen for custom
session handling.
There wasn't really any documentation for this change in 5.6 but we
found the commit and RFC that caused this bug.
Here is the commit that caused the bug:
https://github.com/php/php-src/commit/554021d21e1b2517313a377676260c188152c2eb#diff-52eb9eb7f9d5d9125fbb1337a6541c06R549
The RFC discussing the topic is here:
https://wiki.php.net/rfc/session-lock-ini
It looks like read_only and lazy_write were accepted for this RFC.
Test script:
---------------
http://gobin.io/QfTs?php
Expected result:
----------------
Session's write custom handler should be called.
Actual result:
--------------
The custom write handler is not called.
--
Edit bug report at https://bugs.php.net/bug.php?id=68331&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68331&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68331&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68331&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=68331&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=68331&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=68331&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=68331&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=68331&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=68331&r=support
Expected behavior: https://bugs.php.net/fix.php?id=68331&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=68331&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=68331&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=68331&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68331&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=68331&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=68331&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=68331&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=68331&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=68331&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=68331&r=mysqlcfg
Thread (14 messages)
- mark at grooveshark dot com
- requinix@php.netBug #68331 [Opn->Nab]: Session custom storage callable functions not being called
- mark at grooveshark dot comBug #68331 [Nab]: Session custom storage callable functions not being called
- requinix@php.netBug #68331 [Nab]: Session custom storage callable functions not being called
- jay at grooveshark dot comBug #68331 [Com]: Session custom storage callable functions not being called
- requinix@php.netBug #68331 [Nab]: Session custom storage callable functions not being called
- denis at slik dot euBug #68331 [Com]: Session custom storage callable functions not being called
- james at grooveshark dot comBug #68331 [Com]: Session custom storage callable functions not being called
- yohgaki@php.netBug->Req #68331 [Nab->ReO]: Session custom storage callable functions not being called
- mark at grooveshark dot comReq #68331 [ReO]: Session custom storage callable functions not being called
- yohgaki@php.netReq->Bug #68331 [ReO]: Session custom storage callable functions not being called
- yohgaki@php.netBug #68331 [ReO->Fbk]: Session custom storage callable functions not being called
- yohgaki@php.netBug #68331 [Fbk->Opn]: Session custom storage callable functions not being called
- yohgaki@php.netBug #68331 [Asn->Csd]: Session custom storage callable functions not being called