Need help?

Our experts have had an average response time of 13.14 minutes in February 2024 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

PHP cURL SSL connect error 35 – Top Causes and fixes

by | Sep 28, 2019

What if your cURL requests cannot connect your Website using SSL, isn’t it frustrating?

Usually, PHP cURL SSL connect error 35 occur due to version mismatch or outdated cURL package.

At Bobcares, we often get requests to fix SSL cURL errors, as a part of our Server Management Services.

Today, let’s see how our Support Engineers fix PHP cURL SSL connect error 35 for our customers.

 

What is PHP curl SSL connect error 35?

Before getting deeper into the error, firstly let’s understand what is PHP cURL.

cURL stands for Client for URL. Usually, PHP uses cURL to connect to the specified website URL. Here we are discussing cURL request to an SSL website.

In many situations, when a server tries to connect to an SSL website, the cURL request ends up in an error message.

cURL error (35): SSL connect error.

The error message denotes that there is an error somewhere in SSL/TLS handshake. In short, the cURL error code 35 denotes an SSL connection error.

The error can be due to an outdated cURL package, connection errors or else a version mismatch between the PHP cURL and SSL protocol of the end server.

A sample error at a Drupal website will show up as:

 

How we fix the PHP cURL SSL connect error?

So far, we have seen what is PHP cURL SSL connect error. Our Dedicated Engineers with expertise over a decade usually fix this error for our customers.

As the first step of troubleshooting, we check the webserver log.

It gives a detailed summary of all the SSL/TLS handshakes. From this data, our experts find the exact reason for the timeout.

 

1. SSL protocol of destination site

In most cases, errors will be with the PHP cURL versions in the server.

For instance, the command-line cURL may be using the latest version and the SSL protocol may be outdated.

Meanwhile, if the server tries to connect to an endpoint with an older SSL protocol, it fails and ends up in cURL error 35. This is particularly applicable with outdated SSL protorcols like SSLv2, SSLv3.

So, we check the versions of the cURL and SSL protocol. Later, if there is any version mismatch, our Support Engineers update it to the latest.

 

2. Outdated cURL package

Similarly, an outdated cURL package in the servers shows up the SSL connect error. In this case, our Support Engineers check the cURL version in the server.

rpm -qa | grep curl

This command gives the currently used cURL version in the server.

Later, we update the cURL package to the latest version. After that, we update the Network Security Services (NSS) package on the server using:

yum update -y nss

This fixes the package and the error does not show up again.

 

3. Customizing cURL configuration

Some customers customize the cURL settings on the server. However, improper setting of the PHP cURL configuration file leads to error 35.

In such cases, our Support Team check the configuration file and correct it.

Here, we first confirm the availability of cURL module support for PHP with the command:

php -i | grep -i curl

For example, the correct settings appear as:

/etc/php.d/curl.ini,
curl
cURL support => enabled
cURL Information => 7.66.0

We also ensure that the website uses the correct PHP version with cURL support.

 

4. Firewall restrictions

In many cases, the cURL SSL error can happen due to firewall restrictions on the server too. For example, when network administrators ban SSL connections, none of the data transactions to or from the server happens.

Thus, we always check the firewall on the server and ensure that the server accepts SSL port connections from selected APIs and networks.

 

[Still having trouble in fixing PHP cURL SSL connect error? – We’ll fix it for you.]

 

Conclusion

In short, PHP cURL SSL connect error 35 usually occur due to version mismatch of cURL and SSL, outdated cURL package, firewall restrictions and so on. Today, we also saw how our Support Engineers fix this error for our customers.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Categories

Tags

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF