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

报告相同问题?

悬赏问题

  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 个人网站被恶意大量访问,怎么办
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大