简体   繁体   English

PHP 警告:PHP 启动:无法加载动态库 '/usr/lib/php/20151012/msqli.so'

[英]PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/msqli.so'

Looked at all the articles on search for this and no answers that work -- on Ubuntu 16.04 I'm getting:查看了所有关于搜索此内容的文章,但没有找到有效的答案——在 Ubuntu 16.04 上,我得到:

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 is definitely there in the folder cited above and is owned by root and is excutable. msqli.so肯定在上面引用的文件夹中并且由 root 拥有并且是可执行的。 Folder and parent folders are owned by root.文件夹和父文件夹归 root 所有。 Hell of it is, phpmyadmin is running fine and can see and operate on the mySQL databases just fine.该死的是,phpmyadmin 运行良好,可以很好地查看和操作 mySQL 数据库。 Do I need to chown folders/files to mysql or php entities?我是否需要将文件夹/文件更改为 mysql 或 php 实体? Just reinstalled Apache/php/mysql today and that did not fix it - all latest versions.今天刚刚重新安装了 Apache/php/mysql 并且没有修复它 - 所有最新版本。 Trying to use Eclipse IDE but this code fails on web server, too.尝试使用 Eclipse IDE,但此代码在 Web 服务器上也失败了。 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.还尝试了php.ini扩展msql.somsqlnd.so以及相关的编码技术,但它们都导致了类似上述的消息(但具有适当的 .so 文件名)所以我怀疑它的“环境”设置有问题。 phpinfo() ; phpinfo() ; suggests the drivers are all there and working.建议司机都在那里工作。

It seems that uninstalling all versions of php with似乎卸载所有版本的 php

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

and only installing the latest version with并且只安装最新版本

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

solved the problem for me.为我解决了这个问题。

Solved it with help from this post . 在这篇文章的帮助下解决了它。

Changed php.ini:更改了 php.ini:

extension=/usr/lib/php/20151012/mysqli.so
extension=/usr/lib/php/20151012/mysqlnd.so

to

extension=/usr/lib/php/20151012/mysqlnd.so
extension=/usr/lib/php/20151012/mysqli.so

ie: reversed the order of the 2 entries to put mysqlnd.so first.即:颠倒 2 个条目的顺序,将 mysqlnd.so 放在第一位。

Now I am all happy and telecomputing with alacrity and enthusiasm.现在我很高兴,并且以敏捷和热情的方式进行远程计算。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 PHP警告:PHP启动:无法加载动态库'/usr/lib/php/20151012/gd.so' - PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/gd.so' PHP警告:PHP启动:无法加载动态库'/usr/lib/php/20151012/mysql.so' - PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/mysql.so' PHP警告:PHP启动:无法加载动态库/usr/lib/php/20151012/php_imap.dll - PHP Warning: PHP Startup: Unable to load dynamic library /usr/lib/php/20151012/php_imap.dll PHP警告:PHP启动:无法加载动态库'usr / lib / php / 20151012 / php_pdo_firebird.dll - PHP Warning : PHP Startup: Unable to load dynamic library 'usr/lib/php/20151012/php_pdo_firebird.dll 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_curl.dll'-/usr/lib/php/20151012/php_curl.dll:无效的ELF标头 - Message: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_curl.dll' - /usr/lib/php/20151012/php_curl.dll: invalid ELF header PHP启动:无法加载动态库'/usr/lib/php/20151012/php_mysqli.dll'和php_mysql.dll - PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_mysqli.dll' and php_mysql.dll PHP警告:PHP启动:无法加载动态库'/usr/lib64/php/modules/memcached.so'-/usr/lib64/php/modules/memcached.so - PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/memcached.so' - /usr/lib64/php/modules/memcached.so PHP - 无法加载动态库'/usr/lib/php/20151012/php_curl.dll' - /usr/lib/php/20151012/php_curl.dll - PHP - Unable to load dynamic library '/usr/lib/php/20151012/php_curl.dll' - /usr/lib/php/20151012/php_curl.dll PHP 警告:PHP 启动:无法加载动态库 'cassandra.so'(尝试:/usr/lib/php/20170718/cassandra - PHP Warning: PHP Startup: Unable to load dynamic library 'cassandra.so' (tried: /usr/lib/php/20170718/cassandra
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM