今天遇到了一个问题,在打开wp的后台的时候发现新闻无法正常显示,提示一下错误:
curl: (77) Problem with the SSL CA cert (path? access rights?)
我在网上查了一下,最好的办法就是通过升级curl解决的
我的环境:
centos6 64位+php7.1
默认情况下安装curl的是这个版本:
[root@li1554-232 ~]# curl -V
curl 7.19.7 (x86_64-unknown-linux-gnu) libcurl/7.19.7 OpenSSL/1.0.1e zlib/1.2.3 libidn/1.18
Protocols: tftp ftp telnet dict http file https ftps
Features: IDN IPv6 Largefile NTLM SSL libz
这个时候需要下载一份至少在7.39.0及以上版本的curl,然后编译安装 wget https://curl.haxx.se/download/curl-7.39.0.tar.gz tar xf curl-7.39.0.tar.gz cd curl-7.39.0 ./configure --prefix=/usr/local/curl --without-nss --with-ssl make && make install echo '/usr/local/lib' >>/etc/ld.so.conf && ldconfig [root@li1554-232 ~]# /usr/local/curl/bin/curl -V curl 7.39.0 (x86_64-unknown-linux-gnu) libcurl/7.39.0 OpenSSL/1.0.1e zlib/1.2.3 libidn/1.18 Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smtp smtps telnet tftp Features: IDN IPv6 Largefile NTLM NTLM_WB SSL libz
然后在编译php的时候指定curl的路径(如果已经安装过了php,就要重新在编译安装一次):
--with-curl=/usr/local/curl \
通过phpinfo查看
curl: (77) Problem with the SSL CA cert (path? access rights?)