PHP 警告:PHP 启动:无法加载动态库 '/usr/lib/php/20151012/msqli.so' [英] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/msqli.so'

查看:59
本文介绍了PHP 警告:PHP 启动:无法加载动态库 '/usr/lib/php/20151012/msqli.so'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

查看了所有有关搜索此内容的文章,但没有有效的答案——在 Ubuntu 16.04 上我得到了:

Looked at all the articles on search for this and no answers that work -- on Ubuntu 16.04 I'm getting:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/msqli.so' - /usr/lib/php/20151012/msqli.so: cannot open shared object file: No such file or directory in Unknown on line 0

msqli.so 肯定存在于上面引用的文件夹中,并且由 root 拥有并且可以执行.文件夹和父文件夹归 root 所有.糟糕的是,phpmyadmin 运行良好,可以很好地查看和操作 mySQL 数据库.我需要将文件夹/文件 chown 到 mysql 或 php 实体吗?今天刚刚重新安装了 Apache/php/mysql 并且没有修复它 - 所有最新版本.尝试使用 Eclipse IDE,但此代码在 Web 服务器上也失败.也在php.ini 扩展pdo_msql.somsqlnd.so 以及相关的编码技术中尝试过,但它们都导致了类似上面的消息(但使用适当的 .so 文件名)所以我怀疑它的环境"设置有问题.phpinfo();建议司机都在那里工作.

msqli.so is definitely there in the folder cited above and is owned by root and is excutable. Folder and parent folders are owned by root. Hell of it is, phpmyadmin is running fine and can see and operate on the mySQL databases just fine. Do I need to chown folders/files to mysql or php entities? Just reinstalled Apache/php/mysql today and that did not fix it - all latest versions. Trying to use Eclipse IDE but this code fails on web server, too. Also tried in php.ini extensions pdo_msql.so and msqlnd.so and related coding techniques, but they all resulted in messages like the above (but with appropriate .so filename) so I suspect its 'environmental' something wrong in setup. phpinfo(); suggests the drivers are all there and working.

推荐答案

好像卸载所有版本的php用

It seems that uninstalling all versions of php with

sudo apt-get purge `dpkg -l | grep php | awk '{print $2}' | tr "\n" " "`

并且只安装最新版本

apt install php libapache2-mod-php php-mysql php-xml php-soap php-gd php-mbstring

为我解决了问题.

这篇关于PHP 警告:PHP 启动:无法加载动态库 '/usr/lib/php/20151012/msqli.so'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆