...

PHP_Incomplete_Class_Name when accessing object via session

Exodious
01-04-2004, 09:01 PM
Hiya, I've tried storing a class object on the session, directing to another page and then restoring the class from the session but when trying to access its functions, get PHP_Incomplete_Class_Object error, any ideas?

Storing on session using $_SESSION["classObj"] = &$classObj;

mordred
01-04-2004, 10:52 PM
Shot in the dark: You need to include the class definition on each subsequent page where the object is restored from the class. Plus any class in the inheritance chain of that object, e.g. if "class Foo extends Bar", you need both Foo and Bar class definitions in each file.

And perhaps it's too trivial, but the classes must be included before the session is started.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum