|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: tbrandl at barff dot de
New email:
PHP Version: OS:


 [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-2023 The PHP Group
All rights reserved.
Last updated: Sat Dec 09 12:01:26 2023 UTC