Skip to main content

PHP – SSL Certificate Error: Unable to Get Local Issuer Certificate

Updated over a month ago

Issue:

You’re getting this PHP error when connecting to an HTTPS endpoint (like PDF.co):

SSL certificate error: unable to get local issuer certificate

This error happens because your PHP environment cannot locate the certificate authority (CA) bundle needed to verify SSL certificates.

How to fix it

Recommended solution:

Follow this step-by-step guide on StackOverflow with multiple proven fixes: See Solutions on StackOverflow →

The solutions include:

  • Downloading and configuring cacert.pem

  • Updating PHP’s openssl.cafile or curl.cainfo setting in php.ini

  • Restarting your server after updating config

Helpful tips:

  • Make sure your PHP environment is up-to-date.

  • Test the connection using curl or openssl CLI to check if it’s PHP-specific.

  • This issue is related to local server SSL configuration, not PDF.co’s servers.

Did this answer your question?