__PHP_Incomplete_Class Errors...
| From: | Stephen Craton | Date: | Wed, 27 Oct 2004 02:34:48 +0000 |
| Subject: | __PHP_Incomplete_Class Errors... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-200396@lists.php.net to get a copy of this message | ||
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
(
[__PHP_Incomplete_Class_Name] => users
[user] =>
[loggedin] => 1
[ip] => 12.222.81.78
[db] => __PHP_Incomplete_Class Object
(
[__PHP_Incomplete_Class_Name] => thedatabase
[host] => localhost
[user] => melchior_clients
[pass] => ****************
[data] => melchior_clients
[linkid] => 0
[res] => 0
[num] => 0
[row] =>
[logger] => __PHP_Incomplete_Class Object
(
[__PHP_Incomplete_Class_Name] => logger
[logdir] => logs/
[fp] =>
)
)
[logger] => __PHP_Incomplete_Class Object
(
[__PHP_Incomplete_Class_Name] => logger
[logdir] => logs/
[fp] =>
)
)
For some reason, as far as I can tell, it's making every class variable to
__PHP_Incomplete_Class for some reason. The way I'm accessing the classes
via another class this something like this:
$db = new theDatabase;
$user = new Users;
$user->db = $db;
And then, within the class, I access it as such:
$this->db->query($sql);
This works perfectly on my local machine, but it gets all weirded once I
upload it. I have NO idea why or how to fix it. Does anyone have any ideas?
------------------------------------
Stephen Craton
webmaster@melchior.us
IM: webmaster@melchior.us
http://www.melchior.us
------------------------------------