|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23543 unserialize on object fails when string is loaded with file()
Submitted: 2003-05-08 07:10 UTC Modified: 2003-05-14 11:03 UTC
From: tbrandl at barff dot de Assigned:
Status: No Feedback Package: Strings related
PHP Version: 4.3.1 OS: Win 2k
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
21 - 19 = ?
Subscribe to this entry?

 [2003-05-08 07:10 UTC] tbrandl at barff dot de
this fails (output is null):
$string = unserialize(implode("", file("serialized_Obj.dat")));

print_r($string) == null;

this works:
$string = unserialize(fread($fh, ...));

print_r($string) == the original object.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-05-08 07:19 UTC]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.

can you provide a fully working example illustrating this issue?
 [2003-05-14 11:03 UTC]
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 "Open". Thank you.

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Dec 01 03:05:53 2022 UTC