你的PHP似乎没有安装运行WordPress所必需的MySQL扩展

Posted heshengjun

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了你的PHP似乎没有安装运行WordPress所必需的MySQL扩展相关的知识,希望对你有一定的参考价值。

php -i | grep extension_dir 

 

[email protected]:/usr/lib/php/20151012# apt-get install php-mysql
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
php7.0-mysql
The following NEW packages will be installed:
php-mysql php7.0-mysql
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 126 kB of archives.
After this operation, 488 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.aliyun.com/ubuntu xenial-updates/main amd64 php7.0-mysql amd64 7.0.18-0ubuntu0.16.04.1 [124 kB]
Get:2 http://mirrors.aliyun.com/ubuntu xenial/main amd64 php-mysql all 1:7.0+35ubuntu6 [1,936 B]
Fetched 126 kB in 0s (438 kB/s)
Selecting previously unselected package php7.0-mysql.
(Reading database ... 111452 files and directories currently installed.)
Preparing to unpack .../php7.0-mysql_7.0.18-0ubuntu0.16.04.1_amd64.deb ...
Unpacking php7.0-mysql (7.0.18-0ubuntu0.16.04.1) ...
Selecting previously unselected package php-mysql.
Preparing to unpack .../php-mysql_1%3a7.0+35ubuntu6_all.deb ...
Unpacking php-mysql (1:7.0+35ubuntu6) ...
Processing triggers for libapache2-mod-php7.0 (7.0.18-0ubuntu0.16.04.1) ...
Processing triggers for php7.0-fpm (7.0.18-0ubuntu0.16.04.1) ...
Setting up php7.0-mysql (7.0.18-0ubuntu0.16.04.1) ...

Creating config file /etc/php/7.0/mods-available/mysqlnd.ini with new version

Creating config file /etc/php/7.0/mods-available/mysqli.ini with new version

Creating config file /etc/php/7.0/mods-available/pdo_mysql.ini with new version
Setting up php-mysql (1:7.0+35ubuntu6) ...
Processing triggers for libapache2-mod-php7.0 (7.0.18-0ubuntu0.16.04.1) ...
Processing triggers for php7.0-fpm (7.0.18-0ubuntu0.16.04.1) ...
[email protected]:/usr/lib/php/20151012# /usr/local/apache/bin/apachectl stop
-bash: /usr/local/apache/bin/apachectl: No such file or directory
[email protected]:/usr/lib/php/20151012# apachectl
Usage: /usr/sbin/apachectl start|stop|restart|graceful|graceful-stop|configtest|status|fullstatus|help
/usr/sbin/apachectl <apache2 args>
/usr/sbin/apachectl -h (for help on <apache2 args>)
[email protected]:/usr/lib/php/20151012# apachectl stop
AH00558: apache2: Could not reliably determine the server‘s fully qualified domain name, using 10.173.21.106. Set the ‘ServerName‘ directive globally to suppress this message
[email protected]:/usr/lib/php/20151012# /etc/init.d/apache2 restart
[ ok ] Restarting apache2 (via systemctl): apache2.service.






































以上是关于你的PHP似乎没有安装运行WordPress所必需的MySQL扩展的主要内容,如果未能解决你的问题,请参考以下文章

您的PHP似乎没有安装运行WordPress所必需的MySQL扩展?

您的 PHP 似乎没有安装运行 WordPress 所必需的 MySQL 扩展”处理方法

您的 PHP 似乎没有安装运行 WordPress 必须的 MySQL 拓展。

cpanel中缺少wordpress的Mysql扩展

您的PHP似乎没有 MySQL 拓展

您的 PHP 安装似乎缺少 WordPress 所需的 MySQL 扩展