complex objects and sessions

From: Date: Sat, 14 Jul 2001 07:31:34 +0000
Subject: complex objects and sessions
Groups: php.general 
Request: Send a blank email to php-general+get-57857@lists.php.net to get a copy of this message
Hi, Was the complex object issue ever fixed in PHP 4? I'm running 4.0.6 with imap, and have built a class IMAPSession defined in lib/sessionobject.inc.php. Here is a script: <?php $config = array(); require("config/defaults.inc.php"); require("lib/common.inc.php"); require("lib/sessionobject.inc.php"); require("lib/imap_read.inc.php"); session_start(); session_register(csession); include("Template/header.html"); if(! $csession ){ $csession = new IMAPSession($state); } if(! $state){ $state = "start"; } $csession->SwitchContext($state, $msg); ?> My understanding is that the "csession" object should be stored. But on the second invocation I get: Fatal error: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition imapsession of the object you are trying to operate on was loaded _before_ the session was started in /d0/www/htdocs/webmail/index.php on line 20 any hints would be appreciated. -djb -- #+--+#+--+#+--+#+--+#+--+#+--+#+--+#+--+#+--+#+--+#+--+#+--+#+--+#+--+# David Brumley - Stanford Computer Security - dbrumley at Stanford.EDU Phone: +1-650-723-2445 WWW: http://www.stanford.edu/~dbrumley Fax: +1-650-725-9121 PGP: finger dbrumley-pgp at sunset.Stanford.EDU #+--+#+--+#+--+#+--+#+--+#+--+#+--+#+--+#+--+#+--+#+--+#+--+#+--+#+--+# Life is a whim of several billion cells to be you for a while.

« previous php.general (#57857) next »