Codeigniter空白屏幕 - 无法加载欢迎类

I am in the process of migrating codeigniter from centos to ubuntu and after moving the files, adjusting the config files, etc, I am getting the white screen of death. Debugging it, the code seems to die in CodeIgniter.php at

$CI = new $class();

where

$class = welcome

I have confirmed the MySQL is installed and running, both in PHP and on the command line. Additionally, I can't find codeigniter complaining about any errors in either my apache error logs or the codeigniter ones at application/logs. This is despite setting the logging threshold to 4 and setting display errors to true.

the only solution for this issue to find the php error logs, check it on /var/logs/apache2/errors.log or if you use ssl /var/logs/apache2/ssl_errors.log this is the default paths for php error log

please check your php error logs for getting the error message.

There's 3 solutions to know where's the problem. 1- Codeigniter offer logs for configure it

  • go to application/config.php
  • Change $config['log_threshold'] = 2; //for debug messages
  • Each request you can find the log messages in

application/logs/..

or

system/logs/..

Don't forget to switch it off after fix your issue by change it to 0 or 1 for display error messages only.

2- Or you can Enable development mode but i prefer the first solution.

  • if you want to switch to development mode edit index.php in the main project files and change ENVIRONMENT definition to 'development' this option show errors on the site front.

3- Or you can check the PHP log errors in

/var/log/apache2/error.log

or

/var/log/apache2/ssl_error.log

if you using https