Maher
Maher

Reputation: 373

Curl error: SSL connect error

When i try to make payment using Paypal api it generate this error
'Curl error: SSL connect error'
- PHP version 5.4
but same code work in my local machine and i have PHP 5.6 in local machine
- is there version issue with this or somethings else ?

Upvotes: 0

Views: 11229

Answers (1)

MonkeyZeus
MonkeyZeus

Reputation: 20737

You should get the actual error code with

echo curl_errno($curl); // It might display a '59'

Find '59' at https://curl.haxx.se/libcurl/c/libcurl-errors.html which is CURLE_SSL_CIPHER (59) and read about the error and then research how to fix it.


Possible fix

Based on https://stackoverflow.com/a/4073567 you should try:

curl_setopt($curl, CURLOPT_SSLVERSION, 3);

This is potentially dangerous though, since it forces SSL3.

Upvotes: 2

Related Questions