Fatal error: Call to undefined function mysqli_connect()

前端 未结 14 816
面向向阳花
面向向阳花 2020-11-22 14:48

For 2 days now I\'m trying to solve this, but unfortunately no result. Let me tell you my story about the problem. I\'ve bulid an application on a site, and the application

相关标签:
14条回答
  • 2020-11-22 15:03

    Mine was a bit different for php7 on centos7.

    In /etc/php.ini

    ; extension=mysqli

    to

    extension=mysqli

    0 讨论(0)
  • 2020-11-22 15:05

    if you use ubuntu 16.04 (maybe and above),you have this module already but not enabled by default. Just do this:

    sudo phpenmod mysqli
    
    0 讨论(0)
  • 2020-11-22 15:09

    For CentOS, do:

    sudo yum install php-mysqli
    
    0 讨论(0)
  • 2020-11-22 15:10

    On Raspberry Pi I had to install php5 mysql extension.

    apt-get install php5-mysql
    

    After installing the client, the webserver should be restarted. In case you're using apache, the following should work:

    sudo service apache2 restart
    
    0 讨论(0)
  • 2020-11-22 15:14

    There is no error in the, but the mysqli PHP extension is not installed on your machine. Please contact your service provider to fix this issue.

    0 讨论(0)
  • 2020-11-22 15:15

    On Ubuntu I had to install php5 mysql extension:

    apt-get install php5-mysql
    
    0 讨论(0)
提交回复
热议问题