This error occurrs when you start a session that recreates an object
variable but does not know the class definition for it.
You need to make sure you include the class source before you start the
session.
-Stewart
-----Original Message-----
From: Davor Pleskina [mailto:[EMAIL PROTECTED]]
Sent: 10 May 2001 08:18
To: [EMAIL PROTECTED]
Subject: [PHP] SESSIONS: What does this error mean
Fatal error: The script tried to execute a method or access a property of an
incomplete object. Please ensure that the class definition cl_korisnik_data
of the object you are trying to operate on was loaded _before_ the session
was started in user_info.php on line 72
I declared class like following in the first script file:
class cl_korisnik_data {
var $kname, $ime, $kid, $prezime, $jmbg, $klevel;
};
session_register("korisnik_data");
$korisnik_data = new cl_korisnik_data;
// Then loaded some data into $korisnik_data, all passed OK
In called script user_info.php i wrote code:
<?php
session_start();
echo($korisnik_data->ime);
?>
... and got upper error. Now, what is wrong?
Just to make better question,
do classes also need to be registered within a session?
If so, how?
TIA,
Davor
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]