I've just moved a site across to a production server, and a once working CodeIgniter installation now returns a blank screen. I believe it is due to whitespace, but how are you supposed to find something like that?
7 Answers
Things to check:
- Inside config.php, make sure your
$config['base_url']
is set properly - Were you able to copy your .htaccess as well?
- Do you have the same PHP versions in both machines? If your answer is yes, i'll ask you again: Are you sure?
- What is the value of your $db['default']['hostname']?
- Do you have the same database setup in your local and production server? There could be differences with the hostname, username, password and database name
Other things you can do:
- Set
$db['default']['db_debug']
toTRUE
- Deploy a fresh CodeIgniter installation in your production server and check if you can see something
- If you still see a blank page, deploy a single PHP file with text in it and tell us what you see

- 6,112
- 6
- 45
- 70
-
turns out that the server is running PHP 4 instead of 5. Hopefully the hosting company will update it for me tomorrow. Thanks for replying. – Tisch Aug 11 '09 at 20:12
-
@randell my app is on CI and run on heroku server .Index.php is echo "Hello" but my default controller is nor running .and i am not sure about the php version of heroku and my app(CI='2.1.2',PHP=5.5.16) – HaRsH Aug 30 '14 at 09:31
-
2@HaRsH, make sure that `display_errors` and `display_startup_errors` are set to `true`. Also make sure that `error_reporting` is set to `E_ALL`. See http://stackoverflow.com/a/21429652/106778 for example. – Randell Aug 31 '14 at 11:09
-
@Randell Thanks for your answer... There is problem of MYSQL Ext. I install that bu composer on Heroku server so every thing is working fine ... :) – HaRsH Sep 02 '14 at 10:45
The issue may be due to missing the php module 'mysqli'. This is the driver to your calling on the database. I would check that with:
php -i | grep mysqli
php -m

- 101
- 1
- 2
-
This has solved my problem twice now. CodeIgnitor will blank screen if PHP doesnt have the appropriate database extension installed – Erin Drummond Dec 09 '12 at 10:01
-
This solved my problem as well, thanks @rlane. There were no errors even in the apache2 logs to indicate this was an issue... – Jarrett Sep 19 '13 at 18:58
-
Thank you. This was my problem while hosting on Heroku. I had to update composer.json to include `"ext-mysql": "*"` under the `"require"` section, then run `composer update` to update composer.lock file. – Tod Birdsall Aug 07 '15 at 14:10
-
I experienced the same issue and I solved it by setting my log-folder to writable. It seems, that if you turn on logging, and your log-folder on your server is not writable, CodeIgniter just shows you an empty page.

- 23,665
- 24
- 82
- 119
-
2You just rescued me from 3 hours of hunting. we really need to check the write-ability of that directory. – Eric Cope Nov 22 '11 at 01:54
I have simillar problem. I try all possible way that people wrote. But no one work for me. But, finnaly i found that my index.php is not complete when transfer to server via ftp. So, if anyone still can't solve white screen of death may your index.php is not complete.
If you've moved to a new server ensure the server has PHP-5 installed on it. The reason why the screen is blank is because the server cannot render PHP yet.
Type this line in and restart after:
sudo apt-get install php5 libapache2-mod-php5
To restart:
sudo service apache2 restart
This is of course assuming you have access to the server via an SSH client with admin rights.
best of luck, Niall

- 891
- 1
- 7
- 29
Declare this somewhere in your /index.php file:
function exception_handler($exception) {
echo "Uncaught exception: " . $exception->getMessage();
}
set_exception_handler('exception_handler');
It seems CodeIgniter (v2?) only handles exceptions that are derived from CI_Exception, so any uncaught exceptions (from third party libraries, etc) are not handled.

- 747
- 8
- 11