|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-05-28 01:00 UTC] johannes@php.net
-Status: Open
+Status: Bogus
[2010-05-28 01:00 UTC] johannes@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 06 11:00:02 2025 UTC |
Description: ------------ Hello, Create a class and implement Serializable, then use the serialize function to return the value of serialize($this), apache crashes with an internal server error, the apache error log reports a Premature end of script headers error. If line 17 is commented then the apache server does not crash. Test script: --------------- <?php /**Simple class that is serializable and implements the serializable interface */ class ImplementsSerializable implements Serializable { /** returns the serialization of itself */ public function serialize() { return serialize($this); } /** returns unserialized object passed in $serialized */ public function unserialize($serialized) { return unserialize($serialized); } } /** Create a new ImplementSerializable object */ $serializable = new ImplementsSerializable(); /** Store the serialized value in $serialized, this causes apache to crash, with a * Premature end of script headers error in the apache error log */ $serialized = $serializable->serialize(); /**point of execution does not reach here */ $unserialized = $serializable->unserialize($serialized); echo "finished!"; ?> Expected result: ---------------- return value equal to the object serialized using the serialize function. Actual result: -------------- Apache crashes with internal server error and a Premature end of script headers error.