CodeIgniter Forums
Moving CI website to another server - only blank page showing - 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 CI website to another server - only blank page showing (/showthread.php?tid=71032)

Pages: 1 2 3


Moving CI website to another server - only blank page showing - skindci - 06-28-2018

Dear Forum!

I have to move a website to an another serer. I never moved CodeIgniter websites before, and the site is not made by me. (I'm new in CI...)
I copied all files from the original server, to the new place. And I exported the MySQL database, and imported it into the new server. I edited the index.php, application/config/config.php and database.php. And when I want to show the page, nothing happened. In the browser I only saw a blank page. (The source was empty.)
Please help me, where can I find the error, and what went wrong?

Thanks:
P.


RE: Moving CI website to another server - only blank page showing - Pertti - 06-28-2018

On thing you could check is if you have used short PHP opening tag (<? instead of <?php) anywhere in your code, and if you have, make sure your new server has short_open_tag=On in php.ini

Alternatively you can make sure all your code uses <?php or <?= and no short tags.

That little thing got me quite few times.


RE: Moving CI website to another server - only blank page showing - dave friend - 06-28-2018

Did the domain change or should the same URLs work as before?
Have you checked the logs in /application/logs/ ?


RE: Moving CI website to another server - only blank page showing - jlarroulet - 06-29-2018

(06-28-2018, 05:49 AM)skindci Wrote: Dear Forum!

I have to move a website to an another serer. I never moved CodeIgniter websites before, and the site is not made by me. (I'm new in CI...)
I copied all files from the original server, to the new place. And I exported the MySQL database, and imported it into the new server. I edited the index.php, application/config/config.php and database.php. And when I want to show the page, nothing happened. In the browser I only saw a blank page. (The source was empty.)
Please help me, where can I find the error, and what went wrong?

Thanks:
P.

Before moving the actual site, did you test if your new server setup and fresh CI installation were functioning properly? (easiest way is to just set up CI and try to browse to the site to see if you get CI's welcome page)

I'd check:
Server settings:
* is the server running Nginx or Apache? If Nginx, are you running PHP-fpm? If Apache, did you install PHP, etc?
* is the virtualhost configured to use PHP in your web directory
* is the virtualhost pointed to the correct route where your application lives?

I'm all guessing here, but some configuration snippets from your new installation would greatly help sorting this issue.


RE: Moving CI website to another server - only blank page showing - skindci - 06-30-2018

(06-28-2018, 06:34 AM)Pertti Wrote: On thing you could check is if you have used short PHP opening tag (<? instead of <?php) anywhere in your code, and if you have, make sure your new server has short_open_tag=On in php.ini

Alternatively you can make sure all your code uses <?php or <?= and no short tags.

That little thing got me quite few times.

I set the short_open_tag to On, but nothing happened :/


RE: Moving CI website to another server - only blank page showing - skindci - 06-30-2018

(06-28-2018, 12:32 PM)daveĀ friend Wrote: Did the domain change or should the same URLs work as before?
Have you checked the logs in /application/logs/ ?

Tha domain has changed.
The /application/logs/ folder is empty, only an index.html is there... I don't know, why?


RE: Moving CI website to another server - only blank page showing - skindci - 06-30-2018

(06-29-2018, 11:40 AM)jlarroulet Wrote: Before moving the actual site, did you test if your new server setup and fresh CI installation were functioning properly? (easiest way is to just set up CI and try to browse to the site to see if you get CI's welcome page)

I'd check:
Server settings:
* is the server running Nginx or Apache? If Nginx, are you running PHP-fpm? If Apache, did you install PHP, etc?
* is the virtualhost configured to use PHP in your web directory
* is the virtualhost pointed to the correct route where your application lives?

I'm all guessing here, but some configuration snippets from your new installation would greatly help sorting this issue.

In the new server I installed and tested Apache2, PHP, and MySQL.
I'll check the virtualhost settings, when I'm in my workplace, and I'll gladly send my configuration files.
Thank for the help!


RE: Moving CI website to another server - only blank page showing - dave friend - 06-30-2018

How did you place the files and folders of CodeIgniter relative to the website root (public) folder?


RE: Moving CI website to another server - only blank page showing - Leo - 06-30-2018

(06-30-2018, 01:38 AM)skindci Wrote: Tha domain has changed.
The /application/logs/ folder is empty, only an index.html is there... I don't know, why?

Have you checked $config['log_threshold'] in your config.php?
or the log_path and is the log_folder able to be written to?
is environment set to development?


RE: Moving CI website to another server - only blank page showing - skindci - 07-02-2018

(06-30-2018, 07:10 AM)daveĀ friend Wrote: How did you place the files and folders of CodeIgniter relative to the website root (public) folder?

The website root folder is the /var/www/html/, and I put the webpage to the /var/www/html/szig/ folder.