赞
踩
升级线上环境php版本,PHP5.5升级到5.6.30关于PHP扩展Curl SSLversion版本的坑。
经过了各个扩展模块的安装后升级成功,一周后PHP代码curl访问https相关的网站报错,查看openssl安装包如下 dpkg --list | grep openssl libevent-openssl-2.0-5 2.0.16-stable-1ubuntu0.2 libgnutls-openssl27 2.12.14-5ubuntu3.12 openssl 1.0.1-4ubuntu5.2 python-openssl 0.12-1ubuntu2
和测试环境(测试环境一切正常)对比缺少libcurl4-openssl-dev apt-get install libcurl4-openssl-dev
安装成功查看ssl version还是GnuTls
尝试重新编译PHP,编译后查看 php -i curl cURL support => enabled cURL Information => 7.22.0 Age => 3 Features AsynchDNS => No Debug => No GSS-Negotiate => Yes IDN => Yes IPv6 => Yes Largefile => Yes NTLM => Yes SPNEGO => No SSL => Yes SSPI => No krb4 => No libz => Yes CharConv => No Protocols => dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, pop3, pop3s, rtmp, rtsp, smtp, smtps, telnet, tftp Host => x86_64-pc-linux-gnu SSL Version => OpenSSL/1.0.1 ZLib Version => 1.2.3.4
已更改为openssl经上述判断因缺少libcurl4-openssl-dev包,ssl version默认使用了GnuTls
欢迎加入Linux/shell/python/架构,群聊号码:722022662
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。