Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Posts
    165
    Thanks
    0
    Thanked 0 Times in 0 Posts

    PHP_Incomplete_Class_Name when accessing object via session

    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;

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    frankfurt, german banana republic
    Posts
    1,848
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    De gustibus non est disputandum.


  •  

    LinkBacks (?)

    1. 05-11-2014, 03:09 PM

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •