duan01203 2014-06-18 16:22
浏览 567

Ubuntu PHP致命错误:在调用PHP脚本时调用..中的未定义函数mysqli_connect()

I run Ubuntu desktop 14.04 LTS (Trusty Tahr), and I am trying to setup Apache 2, MySQL server and PHP, but I keep gettin the following error:

PHP Fatal error: Call to undefined function mysqli_connect() in..

What I have done is these changes in the correct php.ini:

uncomment:

extension=msqli.so

set path aquired from phpinfo():

extension_dir = "./usr/lib/php5/20121212+lfs"

Why is the mysqli function to connect to the database still undefined?

  • 写回答

2条回答 默认 最新

  • dougu1985 2015-07-06 02:41
    关注

    In my case php5-mysql was missing from my Ubuntu server. After installing the package it is working fine with mysqli adapter.

    sudo apt-get install php5-mysql
    

    It resolved my CodeIgniter 3.0 mysqli connection valid.

    评论

报告相同问题?

悬赏问题

  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料