Re: __PHP_Incomplete_Class Errors...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* 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."

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux