|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20187 serialize and __sleep function
Submitted: 2002-10-31 05:05 UTC Modified: 2002-11-16 01:11 UTC
From: hellayena at yahoo dot fr Assigned:
Status: No Feedback Package: Reproducible crash
PHP Version: 4.2.3 OS: win2k /iis5
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2002-10-31 05:05 UTC] hellayena at yahoo dot fr
i'm simply want to serialize a class wich contain
a __sleep function and i've got this message  :

PHP has encountered an Access Violation at 019E7712

if i delete the __sleep function this message disappear.

config :

session_auto_start : off;

the following script reproduce the problem :


class kuru_theme
	var $Sql;
	var $Forum_List;
	function kuru_theme() {}
	function __sleep()	{ $this->Sql = 1; }


list($action, $objet) = each($_GET);
		$my_theme = new kuru_theme();
		print '<a href="forum.php?list=1">essai</a>';
		$_SESSION['forum'] = serialize($my_theme);
		$my_theme = unserialize($_SESSION['forum']);


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-31 07:39 UTC] hellayena at yahoo dot fr
sorry !

it's a misreading of the __sleep function.
to solve the problem , you only just have to return an array
in this function.

However, i don't know why the server sen dme this message
 [2002-10-31 09:03 UTC]
Please try using this CVS snapshot:
For Windows:

It still shouldn't cause Access Violation.
Could you check it with snapshot?
 [2002-11-16 01:11 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: Fri Dec 01 11:01:27 2023 UTC