![]() |
Unable to Find model? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Unable to Find model? (/showthread.php?tid=16684) |
Unable to Find model? - El Forum - 03-13-2009 [eluser]amw_drizz[/eluser] Okay, here is the issue I am running into. On my windows xp development machine running Apache 2.2 with PHP 5.2.6 everything works fine. But when I upload it to my live site which is hosted with vlexo.com runing linux with apache 1.3 and suPHP 5.2.6 When uploaded, I loose the models, all the files are there. But the site doesn't work. But the same code that isn't altered much except for changing the site root / base url to the that of my live site. But on my live site, it no longer loads, it just says unable to load model. Unable to Find model? - El Forum - 03-13-2009 [eluser]TheFuzzy0ne[/eluser] Please paste the code for one of the models that doesn't work. Unable to Find model? - El Forum - 03-13-2009 [eluser]amw_drizz[/eluser] Okay this is my ThemeHandler.php Model as the name implies is what it does Code: <?php Unable to Find model? - El Forum - 03-13-2009 [eluser]TheFuzzy0ne[/eluser] What's the exact error message you're getting? Is it "Unable to locate the model you have specified: <Model Name>"? If so, the only three things I know of that could cause the problem are: Invalid application path in config.php Incorrect file permissions. The file really doesn't exist. Try loading the model file with a simple include(), see if it works then. Code: include(APPPATH . 'models/MODEL_NAME.php'); Unable to Find model? - El Forum - 03-13-2009 [eluser]TheFuzzy0ne[/eluser] My final verdict is that your file names are not lowercase like they're supposed to be. Windows doesn't care about filename case, Linux filenames are case sensitive. Unable to Find model? - El Forum - 03-13-2009 [eluser]amw_drizz[/eluser] Now I got Fatal error: Class 'Model' not found in /home/jonwebv/public_html/test/system/application/models/ThemeHandler.php on line 13 Unable to Find model? - El Forum - 03-13-2009 [eluser]amw_drizz[/eluser] oops, that would explain some of it, themehandler.php is actually ThemeHandler.php Unable to Find model? - El Forum - 03-13-2009 [eluser]TheFuzzy0ne[/eluser] So you've solved the problem? Unable to Find model? - El Forum - 03-13-2009 [eluser]amw_drizz[/eluser] soon as I changed all calls to lower case it now works. Unable to Find model? - El Forum - 03-13-2009 [eluser]Colin Williams[/eluser] Best to stick to the naming conventions spelled out in the User Guide. Glad you got it worked out |