Codeigniter : Unable to locate the model you have specified

WebNovice picture WebNovice · Apr 11, 2012 · Viewed 12.7k times · Source

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.

Answer

Starx picture Starx · Apr 11, 2012

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

Like this

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