Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP cUrl ssl timeout

Tags:

php

curl

ssl

I'm using cUrl with Php (latest stable Ubuntu version) to get a remote https page, and curl_exec returns false after reaching timeout. Obviously I'm using theese settings:

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". Some strange facts:

  1. The same script written in perl runs by CLI in the same machine
  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!

like image 419
rcason Avatar asked Jun 01 '26 19:06

rcason


1 Answers

Solved with:

curl_setopt($soap_do, CURLOPT_SSLVERSION, 3);

like image 86
rcason Avatar answered Jun 03 '26 09:06

rcason