简体   繁体   English

PHP cUrl ssl超时

[英]PHP cUrl ssl timeout

I'm using cUrl with Php (latest stable Ubuntu version) to get a remote https page, and curl_exec returns false after reaching timeout. 我正在使用带有Php(最新稳定的Ubuntu版本)的cUrl来获取远程https页面,并且curl_exec在达到超时后返回false。 Obviously I'm using theese settings: 显然我正在使用theese设置:

curl_setopt($soap_do, CURLOPT_SSL_VERIFYPEER,   0);
curl_setopt($soap_do, CURLOPT_SSL_VERIFYHOST,   0);

Using wireshark, it seems that the server doesen't answer after "Client Hello". 使用wireshark,似乎服务器在“Client Hello”之后没有回答。 Some strange facts: 一些奇怪的事实:

  1. The same script written in perl runs by CLI in the same machine 用perl编写的相同脚本由CLI在同一台机器上运行
  2. The exactly same code running an older machine correctly works 运行旧机器的完全相同的代码正常工作

Hints? 提示? Someone suggests to recompile curl and openssl... I could do it on the development machine, but the production server has the same problem, and for ease of maintainance I'd like to keep only original packets there... Thanks! 有人建议重新编译curl和openssl ...我可以在开发机器上做,但生产服务器有同样的问题,为了便于维护,我想只保留原始数据包...谢谢!

解决:

curl_setopt($soap_do, CURLOPT_SSLVERSION, 3);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM