Skip to content
MtrXTools

cURL error 60: SSL certificate problem: unable to get local issuer certificate

PHP cURL can't verify the server's certificate

Seen in PHP cURL, Guzzle, Laravel, Symfony HttpClient, WordPress, Composer · Last updated

PHP cURL could not verify the server certificate, most often because PHP has no usable CA bundle.

Common causes

  • PHP on Windows, or a custom build, ships without a CA bundle configured.
  • The server omits its intermediate certificate.
  • A corporate proxy re-signs HTTPS traffic with its own CA.
  • Other variants name the problem directly, such as "certificate has expired" or "self-signed certificate".

How to fix it

  1. Download cacert.pem from curl.se/docs/caextract.html and set curl.cainfo and openssl.cafile to it in php.ini, then restart PHP.
  2. On Linux, install or update ca-certificates.
  3. If the server omits its intermediate, fix the server chain.
  4. Guzzle's 'verify' => false only hides the problem and is not a fix.
Check whether the chain is complete

Got a different message? Paste it into the error explainer.

Related errors

All 32 Languages & runtimes errors