Question

My model is:

/application/models/tester.php

The code inside is:

class Tester extends CI_Model
{

    function __construct()
    {
        parent::__construct();
        $this->load->database();
    }
}

And here's the usage:

class Hauth extends CI_Controller
{

    public function index()
    {
        $this->load->view('hauth/home');
    }

    public function login($provider)
    {
        // Load models
        $this->load->model('Tester');

        // Load helpers
        $this->load->helper('url');
        log_message('debug', "controllers.HAuth.login($provider) called");

It works perfectly on my local WAMP server but I get this error on the LAMP production envrionment:

An Error Was Encountered

Unable to locate the model you have specified: Tester

I've looked at a dozen StackOverflow questions that appear to be similar but I've tried all of the solutions posted. As far as I can tell, I've followed the CI manual to the letter. I figured that perhaps file names were an issue WAMP vs LAMP so I confirmed the case of the file names via FTP. Thought it might be a naming conflict, so I renamed them "tester". Again, works perfect on local, but not on live.

Was it helpful?

Solution

I found the problem. Turns out I accidentally used a zip of Codeigniter 3.0-dev. When I moved my application files over to the latest stable version, everything instantly worked.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top