Re: session question: session.auto_start vs. session_register.
| From: | Jason G. | Date: | Thu, 06 Dec 2001 01:28:21 +0000 |
| Subject: | Re: session question: session.auto_start vs. session_register. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-76812@lists.php.net to get a copy of this message | ||
You may want to check out something like auto_prepend_file. Look at the PHP configuration help.
I was thinking that you may be able to include your class definition there - IF auto_prepend_file IS INCLUDED BEFORE session.auto_start starts the session.
Otherwise, use auto_prepend_file to include a file that:
1. Inludes your class def
2. Starts your session.
Just my 2 Cents.
-Jason Garber
IonZoft.com
At 12:44 PM 12/5/2001 -0800, Kurt Lieber wrote:
I am working on an open source e-commerce package and have hit a wall with sessions. If I have session.auto_start turned on, I get the following error message: Fatal error: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition shoppingcart of the object you are trying to operate on was loaded _before_ the session was started in <path to my file> on line 12 If I turn session.auto_start off, the error disappears. So, the error message tells me that I can't use the class unless I've defined it before the session gets started. However, session.auto_start (as far as I know) starts a session immediately, before even waiting for a script to be fully parsed & executed. So, the two seem mutually exclusive. (but then the usefullness of session.auto_start would seem extremely limited) Is there a way I think there's some glaring errors in my understanding here. Can someone help me fill in the holes? --kurt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net