Home > CodeIgniter > How to fix Unable to locate the model you have specified message in CI

How to fix Unable to locate the model you have specified message in CI

September 25th, 2008

For the last few days I have been working on a project based on CodeIgniter framework. As this was my first CodeIgniter application, problems were bound to show up. It was just a matter of time. My developer machine is powered by Windows XP, and my working environment is based on WAMP version 2.0 that comes packed with PHP 5.2.6. Installing CodeIgnites was a peace of cake.

After few days of development, time has come to move the application to the server where it will be accessed by other developers trough SVN. Deploying was rather painful since I overlooked the obvious. Server that was hosting the files was on Linux. It is know fact that Windows and Linux look at files a bit differently. The thing is, my CodeIgniter application got loaded as far as to the first $this->load->model(’SomeModelName’) part.

All i got was the annoying error Unable to locate the model you have specified. After about an hour of hunting for bugs I realized it was not a bug, just a naming convention problem. It was not actually a in a real sense of a word. For all of you with the same problem, all you need to do is to rename your modul and library names to be lowercase.

Here are some screen shot on how the name of the models should look lika, as well on how the class names and function calls should look like. Just remember, if you start getting this error, then it’s letter case related. Hope this saves someone couple of minutes of their lives.

Interesting? Share it!
  • Digg
  • del.icio.us
  • Google
  • Technorati
  • Facebook
  • TwitThis
  • description

Related articles

  • No Related Post

CodeIgniter ,

  1. No comments yet.
  1. No trackbacks yet.