![]() |
Fatal Error with Login session - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Fatal Error with Login session (/showthread.php?tid=60828) |
Fatal Error with Login session - El Forum - 07-08-2014 [eluser]Unknown[/eluser] Can anyone please help me, I am getting the following error message when someone has logged in and tried to click on their profile: Fatal error: c_login::checkSession() [<a href='c-login.checksession'>c-login.checksession</a>]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "c_customer" 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 /var/www/synced/mycactus/class/c_login.php on line 111 here is the c_login class Code: class c_login Fatal Error with Login session - El Forum - 07-08-2014 [eluser]CroNiX[/eluser] Could be several things. In your user() method, does $_SESSION['login_user'] contain an instance of the c_customer class? Because you are trying to access a method, isValid(), in your checkSession() method which looks like it belongs to the c_customer class. It all boils down to this line: Code: c_login::user()->isValid() Fatal Error with Login session - El Forum - 07-09-2014 [eluser]Unknown[/eluser] hi, thanks for your reply, I am very new to all this... this was working and suddenly stopped for some reason, could it be the PHP / APACHE versions on the server? Fatal Error with Login session - El Forum - 07-10-2014 [eluser]CroNiX[/eluser] "The script tried to execute a method or access a property of an incomplete object." Google that message. Most likely you aren't serializing the User class before storing it in session and/or not unserializing it when retrieving it. |