April 11, 2012

Codeigniter : Unable to locate the model you have specified

Question by WebNovice

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 by Starx

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

Like this

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

Author: Nabin Nepal (Starx)

Hello, I am Nabin Nepal and you can call me Starx. This is my blog where write about my life and my involvements. I am a Software Developer, A Cyclist and a Realist. I hope you will find my blog interesting. Follow me on Google+

...

Please fill the form - I will response as fast as I can!