php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #43308 Functions to use registered serializer handlers to serialize and unserialize
Submitted: 2007-11-15 22:29 UTC Modified: 2021-04-11 04:22 UTC
Votes:5
Avg. Score:4.6 ± 0.8
Reproduced:4 of 4 (100.0%)
Same Version:1 (25.0%)
Same OS:1 (25.0%)
From: jani dot ollikainen at pronetko dot fi Assigned: cmb (profile)
Status: No Feedback Package: *General Issues
PHP Version: 5.2.5 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jani dot ollikainen at pronetko dot fi
New email:
PHP Version: OS:

 

 [2007-11-15 22:29 UTC] jani dot ollikainen at pronetko dot fi
Description:
------------
Ok, Tried this once with feature request #42725
and no go. Second try..

First read the #42725 and then read this:

Of course I know those, but those don't unserialize() data which is
formatted like:

PUTLASTHOST|s:23:"kuvajainen.domain.tld";PUTHOST|s:23:"kuvajainen.domain.tld";PUTDOCROOT|s:39:"/data/www/c/k/u/kuvajainen.domain.tld";putprofiles|s:3:"4,5";

And there are many different serializer handlers in php, for example:
Registered serializer handlers => php php_binary wddx

So there should be functions which can use those registered serializer
handlers to serialize/unserialize data accordingly selected serializer
handler.

So I don't think that this is bogus feature request.
Prove me wrong, but serialize/unserialize isn't the answer.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-12-19 17:56 UTC] emil dot hall at gamereactor dot se
You get one vote from me! This is far from bogus. And here is a simple test case:

session_start();
echo serialize($_SESSION), "\n";
echo file_get_contents('/path/sess_'.session_id());

If the advice from derick@php.net was solid, I would expect the exact same output from both echoes.

Actual result:
a:1:{s:4:"asdf";s:6:"foobar";}
asdf|s:6:"foobar";
 [2021-03-31 14:49 UTC] cmb@php.net
-Status: Open +Status: Feedback -Package: Feature/Change Request +Package: *General Issues -Assigned To: +Assigned To: cmb
 [2021-03-31 14:49 UTC] cmb@php.net
> So there should be functions which can use those registered
> serializer handlers to serialize/unserialize data accordingly
> selected serializer handler.

The question is, why?  I mean, there are already session_encode()
and session_decode() to populate $_SESSION manually – do you need
something else?
 [2021-04-11 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 02:01:28 2024 UTC