From development machine (mac) there is no problem connecting via cURL in PHP to this, but in Ubuntu, I get this error. I've tried on a local machine and on an Amazon AWS instance. I've googled and googled and keep coming up to brick walls. There's no firewall restrictions in place, its a complete mystery. php5-curl IS installed in ubuntu, I just don't have any ideas. I ran this command:
curl -v https://api.rkd.reuters.com/api/2006/05/01/TokenManagement_1.svc/Anonymous
and got this output, no clues whatsoever to a solution. OpenSSL is also installed.
* About to connect() to api.rkd.reuters.com port 443 (#0)
* Trying 159.220.40.240... connected
* successfully set certificate verify locations:
* CAfile: none
CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* Unknown SSL protocol error in connection to api.rkd.reuters.com:443
* Closing connection #0
curl: (35) Unknown SSL protocol error in connection to api.rkd.reuters.com:443
Any ideas welcomed on this
Error : CURL Error: 35 - OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to httpapi.com:443 (IP: 162.x.x.x & 204.x.x.x)
Incase of WHMCS:
You can contact your host to whitelist the IP address at their end to use their API.
I had this problem, and I fixed it by setting the curl SSL version to version 3
Apparently the server started requiring SSL version 3, and this setting caused cURL with SSL to start working again.
I had the same problem, unfortunately with a host unwilling to upgrade to php 5.5.
I solved it by creating a new class extending php's SoapClient to use cURL:
Fixed it! It's a known problem with Ubuntu 12.04
These instructions
http://willbradley.name/2012/10/workaround-for-php-error-in-ubuntu-12-04-soapclient-ssl-crypto-enabling-timeout/
-- Cancel that, it just disabled exceptions, this is still not working! HELP!
-- EDIT - HERES HOW I FIXED IT IN THE END!
I upgraded to PHP 5.5 from 5.4.3 and set the following options in my call, which fixed it:
The upgrade was necessary because the constant SOAP_SSL_METHOD_SSLv3 isn't present in PHP versions < 5.5, and unfortunately Ubuntu Server at the time would only allow an upgrade to 5.4.3 through apt-get update php5. I manually installed the later version, and it works fine now.