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:
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!