Edit report at https://bugs.php.net/bug.php?id=25630&edit=1

 ID:                 25630
 Updated by:         yohg...@php.net
 Reported by:        marrtins at hackers dot lv
 Summary:            session_decode feature
-Status:             Assigned
+Status:             Closed
 Type:               Feature/Change Request
 Package:            Session related
 PHP Version:        4.3.3
 Assigned To:        yohgaki
 Block user comment: N
 Private report:     N

 New Comment:

php_serialize will be available from PHP 5.5.4.

http://git.php.net/?p=php-
src.git;a=commit;h=c51f77fe83cea3a48d89423863e6916b77628e47


Previous Comments:
------------------------------------------------------------------------
[2013-08-10 08:18:21] yohg...@php.net

Related To: Bug #65359

------------------------------------------------------------------------
[2013-08-10 08:04:04] yohg...@php.net

Use php_serialize serialize handler, then you'll not have such issue.

php_serialize is available 5.6 or later.

------------------------------------------------------------------------
[2012-03-31 04:34:20] yohg...@php.net

I think there is dup of this request.

------------------------------------------------------------------------
[2010-11-19 14:35:15] lealcy at gmail dot com

There is no need for a new function to do this, just change the prototype of 
session_decode function to

function session_decode($data, $overwrite_session = true);

then make the function returns an array with the session data always, this let 
to 
the programmer to choose overwrite the $_SESSION or just get the decoded array.

------------------------------------------------------------------------
[2003-09-23 03:45:43] marrtins at hackers dot lv

so i'll try to explain now :)
my homepage uses sessions(i wrote a session handler) to store users information 
- some username, visited sections, etc data

i wrote a script, to check who is online right now - scanning for sessions 
active in last 3 minutes. script reads those session data from mysql table. 
data looks like this:

$session_data="user|a:2:{s:8:"username";s:6:"foobar";s:9:"useremail";s:0:"";}<some
 other data>..."

sou, it will be usefull to have function to get all these variables in one 
array. for example

$session_vars = get_session_vars($session_data);

as a result will be
$session_vars['username'] = 'foobar';
$session_vars['useremail'] = '';
...
and so on.

------------------------------------------------------------------------


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=25630


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=25630&edit=1

Reply via email to