Req #17860 [Com]: Suggestion: auto detect whether session changed
| From: | bouvrette dot nicolas at gmail dot com | Date: | Sun, 23 Nov 2014 21:09:15 +0000 |
| Subject: | Req #17860 [Com]: Suggestion: auto detect whether session changed | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-188758@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=17860&edit=1
ID: 17860
Comment by: bouvrette dot nicolas at gmail dot com
Reported by: Xuefer at 21cn dot com
Summary: Suggestion: auto detect whether session changed
Status: Closed
Type: Feature/Change Request
Package: Session related
Operating System: all
PHP Version: 4.2.1
Assigned To: yohgaki
Block user comment: N
Private report: N
New Comment:
Is there any configuration so avoid this new behavior? I myself manage the session expiration in the
DB and need that every page load force a write even if nothing has changed.
I checked here and couldn't find anything about this new feature:
http://php.net/manual/en/session.configuration.php
This is breaking my code right now... could we implement a way to configure this?
Previous Comments:
------------------------------------------------------------------------
[2013-08-10 04:57:37] yohgaki@php.net
Will be available 5.6 or later.
------------------------------------------------------------------------
[2012-03-30 10:01:07] yohgaki@php.net
I'll implement by checking hash of serialized session data.
Saving unneeded session writes is good for many apps.
------------------------------------------------------------------------
[2002-06-20 00:15:11] Xuefer at 21cn dot com
yes, i know, a file handler don't need to update mtime, they have "atime", but for a
drive which not local, or sql_session_handler, a remote sql server, it's nightmare to send
session data every page load
we need to detect whether "it's REALLY need to update session data"
------------------------------------------------------------------------
[2002-06-20 00:09:15] Xuefer at 21cn dot com
session data changed need ===> session update
session active need only ===> session "mtime" update, and don't need to update
frequently
sometime, it's hard for ourself do judge whether to open a session in readonly mode.
it is possible to detect whether $_SESSION is changed ?
i just do it using md5 now, but if there's and capability to do internally, e.g.: a flag set
when session changed, should be faster than md5.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=17860&edit=1