CodeIgniter Forums
Moving local app to live server - 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: Moving local app to live server (/showthread.php?tid=67312)



Moving local app to live server - jmccarthy - 02-09-2017

Hi, I'm new here and also new to the world of Codeigniter, bar reading through the version 3 docs so please bare with me if I'm missing some vitals!

I've just inherited a development project built with version 2.1.4. I was given a complete backup and which I loaded into my current local dev solution "Laravel Valet" connected the database and the app loaded and is fully functioning. 

Next step was to load it onto a live server where it may potentially be living in the future. 

My first attempt was to run the same process of loading the files and connecting the database on an apache setup. The index.php loaded, but navigating to either "app/index.php/controller" or "app/controller" just gave me a cPanel 404 as did navigating anywhere but index.php.

After many hours of triple checking credentials and plowing through countless threads of similar situations I couldn't resolve the issue.

I then tried the same process on linode I have setup for small dev projects running nginx. In this setup I was not able to load the app at all and was faced with the error "Fatal error: Uncaught Error: Class 'CI_Controller' not found in ...ci/core/CodeIgniter.php:233". 

There's also a notice later in the stack "CI_DB_driver->display_error('db_unable_to_co...')". I know the credentials for the db are correct. But I'm lost as to what could be causing the issue.

Both servers I've tested on have resulted in unique errors but, it is working on my local laravel valet install on OSX.

At this point I don't know how much dumping lots of code here will help. Does anybody recognise this situation and would be willing to point me in the right direction?

Thanks in advance!


RE: Moving local app to live server - InsiteFX - 02-10-2017

1) Check your index.php file and make sure that the application and system folders are set correct
2) You may need to check and change the base_url in your ./application/config/config.php file.
3) Check the database settings in ./application/config/database.php file.

It could also be your .htaccess file that could be causing problems.