Re: SESSION var and Objects problem
| From: | Stuart Dallas | Date: | Fri, 02 Mar 2012 21:14:13 +0000 |
| Subject: | Re: SESSION var and Objects problem | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-316857@lists.php.net to get a copy of this message | ||
On 2 Mar 2012, at 21:09, Jim Giner wrote:
> ok - In examinig the objects in the Session after the data has been
> displayed and the user has hit triggered a re-entry into my script (just one
> script involved here), the objects in the session array now say
> "[__PHP_Incomplete_Class_Name" and "__PHP_Incomplete_Class Object ". They
> didn't say that during my examiniation of the sess var before exiting the
> script.
>
> Also with All error reporting on (a great tip that I never think of) I get
> many messages indicating that the object may not have been loaded. I don't
> know what this means. The include file for my class is present in my script
> and is always loaded. But at this point in the process no functions of the
> class have been called. Is that a problem? In trying to re-display my data
> stored in the Sessioin array I instantiate a var of the class and then pop
> an array off the session var and assign it to the object and then call my
> display function to show the data on the webpage - that is where I get the
> errors. Here is one of these messages:
>
> Notice: DisplayAnEntry() [function.displayanentry]: The script tried to
> execute a method or access a property of an incomplete object. Please ensure
> that the class definition "Entry" of the object you are trying to operate on
> was loaded _before_ unserialize() gets called or provide a __autoload()
> function to load the class definition in
> /home/albany/public_html/tms/php/tmsentry.php on line 372
Make sure the class is declared before you call session_start.
-Stuart
--
Stuart Dallas
3ft9 Ltd
http://3ft9.com/