wp-super-cache页面不相符!时间戳有差异或者不存在错误解决

服务器升级PHP5.6后,WP-SUPER-CACHE报错”cURL error 35: Cannot communicate securelibrary: invalid arguments.“,原因是PHP5.6升级后php–curl模块默认使用NSS库的curl,导致wpsupercache无法正常访问本站。

解决方法:

#编译安装curl
wget https://curl.haxx.se/download/curl-7.53.0.tar.gz
tar zxvf curl-7.53.0.tar.gz
cd curl-7.53.0
./configure --without-nss --with-ssl
make && make install
#编译安装php-curl模块
wget http://cn2.php.net/get/php-5.6.30.tar.gz/from/this/mirror
tar zxvf mirror && cd php-5.6.30/ext/curl
phpize
./configure --with-curl=/usr/local/bin/curl --with-php-config=/usr/local/php/bin/php-config #需要自行检查php-config和curl的所在位置
make && make install
#重启php-fpm
systemctl restart php-fpm
#编译安装curl
wget https://curl.haxx.se/download/curl-7.53.0.tar.gz
tar zxvf curl-7.53.0.tar.gz
cd curl-7.53.0
./configure --without-nss --with-ssl
make && make install
#编译安装php-curl模块
wget http://cn2.php.net/get/php-5.6.30.tar.gz/from/this/mirror
tar zxvf mirror && cd php-5.6.30/ext/curl
phpize
./configure --with-curl=/usr/local/bin/curl --with-php-config=/usr/local/php/bin/php-config #需要自行检查php-config和curl的所在位置
make && make install
#重启php-fpm
systemctl restart php-fpm

Leave a Reply

Your email address will not be published. Required fields are marked *