Welcome Guest, Not a member yet? Register   Sign In
Fatal error: Call to a member function on a non-object -- ** IMPORTANT SOLUTION


I thought i should post this as it will help alot, i have an application built on CI running perfectly on my Ubuntu machine @ home but when uploaded to my server it fails and gives the error:

Fatal error: Call to a member function on a non-object...

I tried to solve it and kept getting thesame error, finally i realized that the default version of PHP is 4 so using :
function __construct(){

makes it fail for loading default model.
So incase you are still on PHP4 you might want to use

function Classname(){

so you can load any model at runtime.


Seems pretty obvious to me that if you are running PHP4 you should use PHP4 constructors...

Theme © iAndrew 2016 - Forum software by © MyBB