3

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!

3
  • 1
    I know this would be a proper facepalm moment, but please can you double check you actually did put https as the URL scheme and didn't miss off the s? I can see this behaviour happening if you try and initiate an SSL connection to a TCP port looking for plain text data only... I think it's highly unlikely this is a cURL problem. You could also try forcing a particular SSL version (CURLOPT_SSLVERSION, start with forcing v3). It's worth testing to see if you can do a simple HTTPS GET with cURL to e.g. https://google.com/ Commented Aug 4, 2012 at 18:16
  • Yeah, definitly not a curl problem. Check your DNS too. Commented Aug 6, 2012 at 16:33
  • Worked forcing SSLVERSION to 3. Thanks DaveRandom! Commented Aug 7, 2012 at 20:01

1 Answer 1

6

Solved with:

curl_setopt($soap_do, CURLOPT_SSLVERSION, 3);

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.