PHP启动无法加载动态库/usr/lib/php/20151012/php_mysqli.dll [英] PHP Startup Unable to load dynamic library /usr/lib/php/20151012/php_mysqli.dll
本文介绍了PHP启动无法加载动态库/usr/lib/php/20151012/php_mysqli.dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有Ubuntu 14.04 EC2实例.我已经安装了php 7.当我执行任何php命令时,例如php --version或其他任何命令.我收到以下错误
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 Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_mysqli.dll' - /usr/lib/php/20151012/php_mysqli.dll: cannot open shared object file: No such file or directory in Unknown on line 0
我已经尝试关注
- 在php.ini中启用php_mysqli.dll
- 启用mysqli.so
- 启用php_mysqli.so
- sudo apt-get install php-mysql
但对我没有任何帮助.
有什么建议可以解决这个问题吗?
Any suggestion how I can solve this?
推荐答案
如果您使用的是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.so
的mysqli.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 amysqli.ini
, containingextension=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
这篇关于PHP启动无法加载动态库/usr/lib/php/20151012/php_mysqli.dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文