Software⏱️ 2 min read📅 2026-05-31

How to Fix: PHP - SSL certificate error: unable to get local issuer certificate

PHP SSL certificate error: unable to get local issuer certificate solution.

Quick Answer: Verify that the cacert.pem file is correctly located and accessible in your php.ini file.

The 'unable to get local issuer certificate' error occurs when your system cannot verify the identity of a website. In this case, it's related to the SSL certificate used by Mandrill API.

🛑 Root Causes of the Error

  • Outdated or corrupted SSL certificate.
  • Lack of a trusted CA file in PHP configuration.

✅ Best Solutions to Fix It

Method 1: Update CA Certificate

  1. Step 1: Open the curl_init() function in PHP, and set the CA file using the following code: `curl_setopt($ch, CURLOPT_CAINFO, 'C: ginx iles rust.crt');` Replace 'C: ginx iles rust.crt' with the actual path to your trust certificate.

Method 2: Use Windows Built-in CA Certificate

  1. Step 1: Download and install the Windows 10 default security policies from Microsoft.

💡 Conclusion

By updating your CA certificate or using the Windows built-in one, you should be able to resolve the 'unable to get local issuer certificate' error and successfully use Mandrill API.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions