1

I'm using cloudinary-labs/cloudinary-laravel package to upload images to Cloudinary using the following code:

$result = Cloudinary::upload($request->file('photo')->getRealPath());

but I get cURL error 60 with the following details:

"message": "cURL error 60: SSL certificate problem: self signed certificate in certificate chain (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://api.cloudinary.com/v1_1/{MY-CLOUD-NAME}/image/upload",
"exception": "GuzzleHttp\\Exception\\RequestException",
"file": "F:\\open-source-projects\\soora\\vendor\\guzzlehttp\\guzzle\\src\\Handler\\CurlFactory.php",
"line": 211,

At first, I thought I knew the solution because I've faced the same error in another project (but using AWS instead) so I downloaded cacert.pem file and placed it in the php.ini file, but I'm still getting the same error.

Mahdi
  • 26
  • 3
  • You may want to check the answer in this SO thread - https://stackoverflow.com/questions/21187946/curl-error-60-ssl-certificate-issue-self-signed-certificate-in-certificate-cha – Roee Ben-Ari Nov 14 '21 at 12:46
  • @RoeeBen-Ari Thanks for your reply, but as I mentioned above, I've tried the popular and accepted solution (getting an up-to-date bundle of CA root certificates). But, unfortunately, I'm still having the same problem. – Mahdi Nov 14 '21 at 14:10
  • Hi @Mahdi, I am having this same issue while trying to upload an image to Cloudinary. Have you been able to fix this issue please? – Derekdunes Feb 15 '22 at 18:46

1 Answers1

0

The error you're seeing (cURL error 60: SSL certificate problem: self signed certificate in certificate chain) is most likely related to the Root certificate bundles on your server making the request - where those Root certificate bundles are out of date.

To resolve the issue, as a first step, please check and update the certificate bundles on your server.

Tom
  • 101
  • 4