dongzhuang6177 2017-09-09 10:15 采纳率: 100%
浏览 67

Codeigniter项目在现场Ubuntu 14.04服务器上显示空白页面

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 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

  • 写回答

2条回答 默认 最新

  • dongqindu8110 2017-09-09 19:21
    关注

    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];

    评论

报告相同问题?

悬赏问题

  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题
  • ¥15 Python时间序列如何拟合疏系数模型