Req #20421 [Asn->Csd]: session_abort() and session_reset()
| From: | yohgaki@php.net | Date: | Sat, 10 Aug 2013 07:58:56 +0000 |
| Subject: | Req #20421 [Asn->Csd]: session_abort() and session_reset() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-180839@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=20421&edit=1
ID: 20421
Updated by: yohgaki@php.net
Reported by: ernest at vogelsinger dot at
Summary: session_abort() and session_reset()
-Status: Assigned
+Status: Closed
Type: Feature/Change Request
Package: Session related
Operating System: *
PHP Version: *
Assigned To: yohgaki
Block user comment: N
Private report: N
New Comment:
These functions are available 5.6 or later.
Previous Comments:
------------------------------------------------------------------------
[2002-11-14 03:19:22] ernest at vogelsinger dot at
What happens to a session when a script gets aborted? I don't believe there can be a one-shot
solution for all situations, and I can easily imagine that one would want to keep the session data,
but doesn't want to save anything changed _just_now_ (similar to a transaction rollback).
A function session_abort() or session_reset() could do just this - abort any open session without
modifying the session storage. Having such methods one could decide in a registered shutdown
function how to proceed.
session_abort()
Works similar to session_write_close() except that it doesn't store session data
session_reset()
Rereads the $_SESSION superglobal from stored session data, destroying any modifications so far. The
session remains open.
Thanks for consideration (possibly in 4.3?),
Ernest
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=20421&edit=1