Home >Backend Development >PHP Tutorial >PHP SSL Error: How to Fix 'Unable to Get Local Issuer Certificate' When Using the Mandrill API?
PHP SSL Certificate Error: Resolving the "Unable to Get Local Issuer Certificate" Issue
When endeavoring to leverage the Mandrill API, PHP developers may encounter an error stating "API call to messages/send-template failed: SSL certificate problem: unable to get local issuer certificate." This article aims to provide guidance in resolving this issue.
The first step is to ensure that the PHP configuration specifies the location of the certificate authority (CA) certificate. Verify that the following lines are present in your php.ini file:
curl.cainfo = "C:\xampp\php\cacert.pem" openssl.cafile = "C:\xampp\php\cacert.pem"
If these entries are absent or incorrect, add them to your php.ini file and restart the Apache server. However, this solution alone may not resolve the issue.
As a comprehensive solution, follow these steps:
curl.cainfo="C:/wamp/cacert.pem" openssl.cafile="C:/wamp/cacert.pem"
After implementing these steps, the PHP application should no longer encounter the "unable to get local issuer certificate" error when utilizing the Mandrill API.
The above is the detailed content of PHP SSL Error: How to Fix 'Unable to Get Local Issuer Certificate' When Using the Mandrill API?. For more information, please follow other related articles on the PHP Chinese website!