cURL Error 60

cURL error 60: SSL certificate problem: unable to get local issuer certificate
I tried to use ZeroSSL and GoGetSSL but I had same problem.

If the REST API go wrong, I can’t renew my SSL certificate automatically, I will need to do it manually.

I tried to find some way to deal this problem like:

  1. Add this following line to php.ini
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

  2. Add a cacert.pem directory in php.ini

Both of them need to access php.ini, but the free hosting service did’t support to edit it.

How to solve this problem?

I’m not sure I understand. However, if you need php.ini access, you might conside upgrading to premium.
If you are using php script, just put

in that script as well as curl_setopt($curl, CURLOPT_SSLVERSION, 3);.

1 Like

Unfortunately, the control panel doesn’t support installing the required files to fix this issue (the CA Chain). You may see this issue regardless of the SSL vendor being used.

This is not a PHP.ini setting, this is PHP code. You can just add this to your own website code, this is not something you can put in a configuration file.

Also, I would recommend to only use the line:

 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

The other line should not be necessary (it checks if the domain in the SSL certificate matches, which should always be true).

You should not do this. Our servers do not support SSL v3 because it’s very old and very unsafe.

And just because the SSL certificate cannot be verified doesn’t mean all SSL settings should be set to the most unsafe values.

Can you tell me how to add this line to my website code?

Not really. It depends on how your website was coded. But since you haven’t shared as much as a URL to the website, let alone important details as to where you see this error, what software you are using, or what REST API you are talking about, it’s impossible for me to say.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.