Re: __PHP_Incomplete_Class Errors...
| From: | Curt Zirzow | Date: | Wed, 27 Oct 2004 03:54:55 +0000 |
| Subject: | Re: __PHP_Incomplete_Class Errors... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-200401@lists.php.net to get a copy of this message | ||
* Thus wrote Stephen Craton:
> I've been working on a script for a while now and it works perfectly on my
> local machine. I'm using a couple of classes, mainly my database and users
> classes.
>
> After logging in, I assign a session variable to the user's row in the
> database: $_SESSION['user'] = $db->row;
>
> This works fine locally, but on my hosted machine, it settings the variable
> to this:
>
> __PHP_Incomplete_Class Object
This means you are not defining your class before starting your
session.
If you store classes in a session you must define you class before
the call to session_start(). If you have session.auto_start = 1 in
your configuration, you will have to disable that so you can define
your classes before starting the session.
Curt
--
Quoth the Raven, "Nevermore."