![]() |
Problem setting up a codeigniter-project on webserver - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9) +--- Thread: Problem setting up a codeigniter-project on webserver (/showthread.php?tid=62677) |
Problem setting up a codeigniter-project on webserver - Liquid8 - 08-13-2015 Hi, I have a codeigniter-project that I've been developing via my own computer with MAMP-server. Now I am trying to move this project to a webserver under a subfolder. When I upload the files and try to open the first screen, I get a 404 error. Strange thing is that if I upload a clean codeigniter installation under another subfolder to the same server the project opens correctly with a welcome screen. So the server itself should be ok. I have tried to define in config.php this: $config['base_url'] = 'http://www.myserver.com/myproject'; $config['index_page'] = 'index.php'; and also this: $config['base_url'] = ''; $config['index_page'] = 'index.php'; in routes.php I have this: $route['default_controller'] = 'mainsite'; And I have that mainsite-controller in controllers-folder If i change the default-controller: $route['default_controller'] = 'welcome'; ..I get an error: "Unable to locate the model you have specified: User_model" I have added that User_model to autoload.php. Any ideas? ![]() RE: Problem setting up a codeigniter-project on webserver - ignitedcms - 08-15-2015 Issues I'd look to investigate: 1)Are you models named with a captial first letter? 2)The default route must target a controller in the top level directory. RE: Problem setting up a codeigniter-project on webserver - Wouter60 - 08-15-2015 Check if your controllers AND models AND libraries are named with a first capital letter. If your localhost is on a Windows environment, it will work when the file names are in small-caps because Windows is case-insensitive when it comes to file names. On a hosted platform, however, the webserver will be case-sensitive. RE: Problem setting up a codeigniter-project on webserver - Liquid8 - 08-19-2015 I checked the capital letters as you both adviced and yes that was the problem! I had named my model-files with lowercase-letters althought the classnames were named with capital letters. Thank you! |