且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

PHP启动无法加载动态库/usr/lib/php/20151012/php_mysqli.dll

更新时间:2023-02-19 18:38:51

如果您使用的是Linux,则不应具有DLL文件,而应具有SO文件. 因此,首先,您必须删除/禁用在php.ini中添加的php_mysqli.dll.

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.

为了使用mysqli,您应该:

In order to use mysqli, you should then :

  • 为Ubuntu安装软件包:apt-get install php-mysql
  • 检查是否已启用(例如,使用phpinfo())
  • 如果未启用,请启用模块-在/etc/php/mods-available/文件夹中检查是否有包含extension=mysqli.somysqli.ini,然后检查CLI/FPM/Apache/other是否存在指向该文件的符号链接(例如,对于CLI,在/etc/php/cli/conf.d/:20-mysqli.ini -> ../../mods-available/mysqli.ini中)
  • 根据您使用的内容重新启动php/apache/nginx
  • 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