Home > Backend Development > PHP Tutorial > How to Resolve 'SSL Certificate Error: Unable to Obtain Local Issuer Certificate' in PHP?

How to Resolve 'SSL Certificate Error: Unable to Obtain Local Issuer Certificate' in PHP?

Susan Sarandon
Release: 2024-12-26 13:43:11
Original
400 people have browsed it

How to Resolve

SSL Certificate Error: Unable to Obtain Local Issuer Certificate in PHP

When encountering an SSL certificate error indicating an inability to obtain the local issuer certificate, it's important to explore various troubleshooting options.

Verifying Certificate Trust

Ensure that the SSL certificate is trusted by PHP. In your case, you've mentioned adding curl.cainfo to the php.ini file. This specifies the path to a certificate authority (CA) bundle. However, it's crucial that the bundle contains the issuer's certificate.

Checking Multiple php.ini Files

As mentioned in the solution, there may be multiple php.ini files. Check both the one accessed from the WAMP taskbar icon and the one located in the specified directory (e.g., C:wampbinphpphp5.5.12) to ensure the certificate trust settings are applied in all instances.

Restarting WAMP Services

After modifying the certificate settings and restarting XAMPP, make sure to also restart the WAMP services to fully apply the changes.

Additional Troubleshooting Steps

If the above steps do not resolve the issue, consider the following:

  • Verify file permissions to ensure that PHP can access the certificate file.
  • Check the error logs for any additional information about the certificate validation failure.
  • Update your PHP and OpenSSL versions to ensure compatibility.
  • Contact the Mandrill API provider for further support if necessary.

The above is the detailed content of How to Resolve 'SSL Certificate Error: Unable to Obtain Local Issuer Certificate' in PHP?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template