Req #49622 [Opn]: allow usage of json and/or php standard serialize format for sessions
| From: | yohgaki@php.net | Date: | Sat, 31 Mar 2012 03:50:43 +0000 |
| Subject: | Req #49622 [Opn]: allow usage of json and/or php standard serialize format for sessions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-169053@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=49622&edit=1
ID: 49622
Updated by: yohgaki@php.net
Reported by: giunta dot gaetano at gmail dot com
Summary: allow usage of json and/or php standard serialize
format for sessions
Status: Open
Type: Feature/Change Request
Package: Session related
Operating System: *
PHP Version: 5.3.0
-Assigned To:
+Assigned To: yohgaki
Block user comment: N
Private report: N
New Comment:
JSON cannot be used (e.g. can't handle binary well) May be BSON?
Plain serializer will be added.
Previous Comments:
------------------------------------------------------------------------
[2011-02-02 20:49:57] lealcy at gmail dot com
Just add a second parameter to the existing function: $overwrite_session = true.
This avoid create a extra function and doesn't break any existing code.
------------------------------------------------------------------------
[2009-09-22 12:14:10] giunta dot gaetano at gmail dot com
Description:
------------
The current session_decode() function is good when the user needs to decode a serialized session
string, but it
- needs to have session_start() called beforehand
- has an impact on the current session state
A lot of comments in the php man pages for unserialize() and session_decode() are from users trying
to write a preg_ based decoder of session data (and failing).
A new function that session_decode_to_array() that
- returned the deserialized data as an array
- did not impact current session state
would imho be quite useful (or adding a flag param to the existing function, to the same effect)
Since this feat. request has already been filed and closed as bogus
(http://bugs.php.net/bug.php?id=42725), what I am proposing here is slightly different: besides
'wddx' and 'php', allow usage of 'json' and 'serialize' as
native serialization formats for session data - the latter corresponding to the native serialize
function.
If there is some information loss involved in using those two formats (ie. references), just make it
clear in the docs.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=49622&edit=1