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

[eluser]ACEFX[/eluser]
Hi

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 :
Code:
function __construct(){
        parent::Controller();
}

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

Code:
function Classname(){
        parent::Controller();
}

so you can load any model at runtime.

Thanks


Messages In This Thread
Fatal error: Call to a member function on a non-object -- ** IMPORTANT SOLUTION - by El Forum - 06-08-2010, 02:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB