dongliang7545 2012-04-18 06:11
浏览 153
已采纳

如何在Ubuntu上设置CodeIgniter

I'm having trouble making my CodeIgniter project work in Ubuntu since I've developed it on Windows. My main problem is that I don't even see any error or warning that can help me determine what the problem is. As you can see it's just a blank screen. The environment that I've declared in the index.php file is development and I've also enabled display_errors by setting it to On.

enter image description here

PHP also seems to be working fine since calling php_info() displays something. I believe I've also configured mysql properly. I've also declared the defaults(host, user, password, port) in php.ini. Can you give me any ideas on how to make something show up?Or something that would allow me to check if I've configured things properly. Please help. Thanks!

  • 写回答

2条回答 默认 最新

  • dongzongpeng6474 2012-04-18 14:27
    关注

    If you're like me and you have installed Apache, PHP, and MySQL separately using sudo apt-get then you most likely encounter the same error wherein there is nothing showing up in the logs and on the browser even if you have already set display_errors to on. What I did was to disable the autoloaded libraries one by one starting from the left. And my problem was on the database class. Turns out that mysqli and mysql drivers for php isn't automatically installed when you install php. All you have to do is to enter the following command:

    sudo apt-get install php5-mysql
    

    Doesn't matter if you have already installed php.

    A little help from CodeIgniter could have save me a few hours trying to debug it.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?