Welcome Guest, Not a member yet? Register   Sign In
Model function references not recognized
#5

[eluser]Phil Norton[/eluser]
Not sure if I'm having the same problem. Basically, I want to migrate a site I've built in CI (http://dev.andersonarchitect.com) from one server to a Media Temple server. I've uploaded the files, and made the relevant changes to the configs, but when I try to view the site on the new server, I get:

Fatal error: Call to a member function on a non-object in /system/application/controllers/site.php on line 12

Thing is, that error isn't appearing on my other server. And line 12 merely does this:

Code:
$nav = $this->site_model->listNav();

And yes, the model is being loaded in the controller. So, why would this work on one server, and not the next? Not sure if it's a PHP error, as my current server is running PHP5, and Media Temple are running PHP4, but this really is baffling me. I tried the var_dump thing, and I could see no sign of the site_model being loaded. So it's as if CI isn't loading the model, even when I tell it to:

Code:
function __construct()
    {
        parent::Controller();
        $this->load->model('site_model', '', TRUE);
    }

Can anyone suggest anything that might help? Bizarrely, there's an admin section that seems to pretty much be working fine, though it's referencing a different model, and uses a different controller.

Help me CI Forum Dwellers, you're my only hope!

Phil


Messages In This Thread
Model function references not recognized - by El Forum - 01-01-2008, 04:24 PM
Model function references not recognized - by El Forum - 01-01-2008, 04:53 PM
Model function references not recognized - by El Forum - 01-01-2008, 07:48 PM
Model function references not recognized - by El Forum - 01-01-2008, 10:28 PM
Model function references not recognized - by El Forum - 01-17-2008, 09:09 AM
Model function references not recognized - by El Forum - 01-17-2008, 09:26 AM
Model function references not recognized - by El Forum - 01-17-2008, 09:34 AM
Model function references not recognized - by El Forum - 01-17-2008, 09:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB