PHP Startup Unable to load dynamic library /usr/lib/php/20151012/php_mysqli.dll

前端 未结 9 761
一整个雨季
一整个雨季 2021-01-04 07:32

I have ubuntu 14.04 EC2 instance. I have installed php 7 on it. when I execute any php command like php --version or any other. I get following error

PHP War         


        
9条回答
  •  走了就别回头了
    2021-01-04 08:11

    If you are on Linux, you shouldn't have DLL files but SO files. So first, you have to remove / disable the php_mysqli.dll you added in php.ini.

    In order to use mysqli, you should then :

    • install the package for Ubuntu : apt-get install php-mysql
    • check if it is already enabled (with phpinfo() for example)
    • if not enabled, enable the module - check in /etc/php/mods-available/ folder if there is a mysqli.ini, containing extension=mysqli.so, then check for CLI / FPM / Apache / other if there is the symbolic link pointing to this file (for example for CLI, in /etc/php/cli/conf.d/ : 20-mysqli.ini -> ../../mods-available/mysqli.ini)
    • restart php / apache / nginx depending what you are using

提交回复
热议问题