Codeigniter : Unable to locate the model you have specified

12.7k views Asked by At

I have upgraded my PHP from version 5.2.9 to 5.3.1 and have encountered the following with my codeigniter application:

Unable to locate the model you have specified: some_model

Codeigniter version 2.1, with HMVC extension Server: Centos 5

The model names are all in lower case and it is also loaded by calling their lower case letter. Everything used to work before the PHP upgrade.

2

There are 2 answers

0
Hardik Panseriya On

Make the second parameter to TRUE:

$this->load->model('modelname', TRUE);
5
Starx On

If you are using HMVC, then you have to provide the module name as well.

Like this

$this -> load -> model('module/model_name');