Problem with SSL certificate cURL
-
Author: EscHelpNew
Status: π’ Open
οΈ Tags: bug,documentation
Created at: 06.12.2023, 09:03:09
Updated at: 12.02.2024, 18:02:05
Error:
Curl error: SSL certificate problem. The cURL library cannot make a request to the Green-API server. The library certificate is probably out of date.Level:
SDKWorkaround:
Option 1:-
Download the certificate bundle.
-
Put it somewhere. In my case, that was c:\wamp\ directory (if you are using Wamp 64 bit then it's c:\wamp64).
-
Enable mod_ssl in Apache and php_openssl.dll in php.ini (uncomment them by removing ; at the beginning). But be careful, my problem was that I had two php.ini files and I need to do this in both of them. One is the one you get from your WAMP taskbar icon, and another one is, in my case, in C:\wamp\bin\php\php5.5.12\
-
Add these lines to your cert in both php.ini files:
curl.cainfo="C:/wamp/cacert.pem"
openssl.cafile="C:/wamp/cacert.pem" -
Restart Wamp services.
Option 2:
append the request code with a string
CURLOPT_SSL_VERIFYPEER => false
-
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register Login