当前位置:   article > 正文

php curl ssl version,ssl版本为GnuTls导致的代码报错,PHP扩展curl sslversion GnuTLS更改为openssl...

php ssl version

升级线上环境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

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/624322
推荐阅读
相关标签
  

闽ICP备14008679号