#17436 [Com]: objects don't persist in sessions
| From: | developer at yecc dot net | Date: | Mon, 30 Jun 2003 17:54:50 +0000 |
| Subject: | #17436 [Com]: objects don't persist in sessions | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969354963@lists.php.net to get a copy of this message | ||
ID: 17436
Comment by: developer at yecc dot net
Reported By: ndp at mac dot com
Status: Closed
Bug Type: Documentation problem
Operating System: MacOS X 10.1.4
PHP Version: 4.2.1
New Comment:
On my computer I have php 4.0.1
I use serialize function after I create a object of a class
and then error does not occured.
I think If use serialize can solve problem of this error.
Previous Comments:
------------------------------------------------------------------------
[2003-04-26 18:26:57] iain at lexingtonwarner dot com
Hi, is it possible to have something like "Class definitions must
appear prior to object being unserialized" as someone has written here,
in the error message? That was the comment that helped me out of my
little hole :-)
------------------------------------------------------------------------
[2003-03-26 00:58:29] rasmus@php.net
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
------------------------------------------------------------------------
[2002-09-16 14:55:39] derick@php.net
It should be documented that session autostart causes this problem
(read latest posting by user).
Derick
------------------------------------------------------------------------
[2002-06-20 14:10:08] ndp at mac dot com
Yes, the issue is indeed session auto_start. (I put a
comment in about this, but don't see it now.)
My recommendation was that the error message could be
changed to indicate what is going on, as this was pretty
hard to track down. The upgrade came with a new php.ini
file, and I trusted it-- therefore it seemed like the new
version was broken, when it wasn't.
The error message could be something like "session objects
are not compatible with session_auto_start setting". That
would help you fix the problem.
I put notes where I could on the php.net site, but it seems
like someone else will undoubtedly run into the same
problem and have the same difficulty diagnosing it.
Andy
------------------------------------------------------------------------
[2002-06-19 05:44:50] twocandles3000 at hotmail dot com
i suppose you have session auto_start disabled, don't you? since class
declaration must appear before unserializing an object, this code won't
work because of the unserialization occurs before the class declaration
if auto_start is set.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/17436
--
Edit this bug report at http://bugs.php.net/?id=17436&edit=1