简体   繁体   中英

Codeigniter project showing blank white page on live Ubuntu 14.04 server

I have 100% working Codeigniter project on localhost.

I have installed LAMP on my Ubuntu 14 server following this guideline

I debugged code very carefully and found that it does not goes further than this line in /var/www/html/bonfire/codeigniter/core/CodeIgniter.php

if (!file_exists(APPPATH . 'controllers/' . $RTR->fetch_directory() . $RTR->fetch_class() . '.php')) {
           // some code here

} else {

    echo "<pre>";
    var_dump(__FILE__);
    var_dump(APPPATH . 'controllers/' . $RTR->fetch_directory() . $RTR->fetch_class() . '.php');
    echo "</pre>";
    // CODE DOES NOT GOES FURTHER THAN THIS LINE
    include(APPPATH . 'controllers/' . $RTR->fetch_directory() . $RTR->fetch_class() . '.php');
}

Output on my browser is

string(54) "/var/www/html/bonfire/codeigniter/core/CodeIgniter.php"
string(35) ".//application/controllers/home.php"

I also tried to put debug messages in application/controllers/home.php 's constructor but that is not even shown in browser.

I have this in my index.php

    error_reporting(E_ALL);

    // Display errors in output
    ini_set('display_errors', 1);

I also have display_errors = On in my php.ini

Any idea what could be wrong? I have spent 4 hours on this :(

More information requested my commentators:

1) My phpinfo: https://pastebin.com/CmFZq2yJ

2) php -m | grep mysql php -m | grep mysql returns empty ... cat /var/log/apache2/error.log shows this https://pastebin.com/q0yyP3Hx ... and here are Codeigniter's logs from localhost and live server respectively ... https://pastebin.com/jWNL2u9M and https://pastebin.com/Z2Xz5xFn

Please check if your have properly installed LAMP;

There is a high chance that somethings missing on LAMP;

Please check if you have mysql server installed;

execute

php -m | grep mysql

it should display something;

another you might want to debug using the log;

cat /var/log/apache2/error.log

Hope this helps ua bit

If you could get the page to display errors or else show the error in error log it could help. But with Code Igniter that problem is likely to be due to the new (remote) server enforcing 'Strict standards' whereas your localhost does not. You might be able to solve it by editing core/Common.php file around line number 257 from return $_config[0] =& $config; to $_config[0] =& $config; return $_config[0]; $_config[0] =& $config; return $_config[0];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM