Hi David!
On Sat, 14 Jul 2001, David Brumley wrote:
> Hi,
> Was the complex object issue ever fixed in PHP 4?
works just fine for me (since 4.0.4pl1)
>
> 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);
in which file is IMAPSession defined?
> }
> 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.
be sure you have the class definition available before calling
session_start();
-- teodor
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]