首页 > 代码库 > 你的PHP似乎没有安装运行WordPress所必需的MySQL扩展
你的PHP似乎没有安装运行WordPress所必需的MySQL扩展
php -i | grep extension_dir
root@iZ25gdzs0p8Z:/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) ...
root@iZ25gdzs0p8Z:/usr/lib/php/20151012# /usr/local/apache/bin/apachectl stop
-bash: /usr/local/apache/bin/apachectl: No such file or directory
root@iZ25gdzs0p8Z:/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>)
root@iZ25gdzs0p8Z:/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
root@iZ25gdzs0p8Z:/usr/lib/php/20151012# /etc/init.d/apache2 restart
[ ok ] Restarting apache2 (via systemctl): apache2.service.
你的PHP似乎没有安装运行WordPress所必需的MySQL扩展