How to fix error 35 PHP cURL SSL connect?

How to fix error 35 PHP cURL SSL connect?

cURL connects with the website using SSL – This is a usual process between the server and you! Sometimes, it will show an error by saying cURL isn’t connecting with your website. And, you need to search for the solution right now! We’ll give you some guess maybe the package of cURL is outdated or mismatch version of PHP.

What exactly is cURL? It is nothing but “Client for URL”! Yes, PHP takes the responsibility to connect cURL with your website using SSL. Whenever the server takes the first step to getting connected with the SSL website it retrieves a message of error saying

Code:
cURL error (35): SSL connect error.
Maybe the handshake of TLS or SSL is the reason behind this error.

Let’s confirm this error in detail:

The error you got with the number is 35 and it says SSL is not ready for connection. Check the package of cURL and the version in-between protocol of SSL and cURL PHP.

Let’s start the fix by referring to the webserver log – The webserver log gives a detailed explanation on handshake of TLS or SSL.
  • Destination website SSL protocol:
Most of the error hits gives in versions of PHP cURL. The outdated SSL protocol and the new version of the cURL command line will revert with error. In case, the server itself tries to get connected with the old format of SSL protocol of course it gives you an error 35. Whatever may the versions of SSLv3 and SSLv2 you will get the result as error 35.

Solution: Update the latest package of SSL protocol and cURL for better results.

  • cURL outdated package:
As said before, another reason behind error 35 is the outdated package of Client for URL. Check the cURL version using the below-mentioned command:

Code:
rpm -qa | grep curl
This command will give the result of the current version you using up. After the check, you can move on with the new version of cURL. Once if you update the new version of cURL then start update on NSS (Network Security Services) using the below-mentioned command:

Code:
yum update -y nss
By now, you won’t be visible with error 35.

Solutions: Check the package of cURL and make it according to the current situation!
  • Configuration of customized cURL:
Most of the users do customization of cURL frequently. In case, if the settings of cURL are wrong it may end up with error 35.

Use the below-mentioned command for checking the settings of cURL:

Code:
php -i | grep -i curl
If the setting is correct please confirm it by below results:

Code:
/etc/php.d/curl.ini,
curl
cURL support => enabled
cURL Information => 7.66.0
Here, the version is correct so, no more error 35.

Solution: Check the current version of cURLand configuration settings too!
  • Restrictions in the firewall:
Due to the restrictions made in the firewall, error 35 occurs with the compact reason of cURL and SSL protocol. The server doesn’t respond to anything if the administrator of the network bans SSL connections. You can’t get any response from the server in and out.

Solution: Do check on the server activity whether it accepts the connection of SSL only from the chosen network and APIs.

We have given you more steps and analysis for cURL can’t connect with SSL connections. I Hope, you might get an idea for improper connections between cURL and SSL protocol. Look out our solutions deep to figure out current scenarios. We have depicted the nature of cURL customization and SSL protocol activity. Guess it gives a way for the fix!
Author
kumkumsharma
Views
24,480
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from kumkumsharma

Top