wordpress安装插件报错 No working transports found

推断:这事由于缺少curl模块导致,编译安装curl模块即可解决

1、安装curl依赖

[root@2df7fb5c5f50 curl]# yum install curl curl-devel -y

2、进入php安装文件的目录进行配置模块

[root@2df7fb5c5f50 curl]# cd /opt/php-5.6.30/ext/curl.
[root@2df7fb5c5f50 curl]# /usr/local/php-fpm/bin/phpize     
 Configuring for:
 PHP Api Version:         20131106
 Zend Module Api No:      20131226
 Zend Extension Api No:   220131226
[root@2df7fb5c5f50 curl]# ./configure --with-php-config=/usr/local/php/bin/php-config

没有任何报错表示配置成功

编译并安装

[root@2df7fb5c5f50 curl]# make && make install

[root@2df7fb5c5f50 curl]# ll /usr/local/php-fpm/lib/php/extensions/no-debug-non-zts-20131226/
 total 2908
 -rwxr-xr-x 1 root root  322168 Aug  6 10:52 curl.so
 -rwxr-xr-x 1 root root  681568 Aug  5 17:34 mysqli.so
 -rwxr-xr-x 1 root root 1340232 Aug  5 16:14 opcache.a
 -rwxr-xr-x 1 root root  623600 Aug  5 16:14 opcache.so

安装完成写入到php.ini文件中

[root@2df7fb5c5f50 curl]# vim /usr/local/php-fpm/lib/php.ini
//添加
extension=curl.so

重启服务测试OK

[root@2df7fb5c5f50 curl]#/etc/init.d/php-fpm restart

发表评论

登录... 后才能评论