Error message
cURL error 77: error setting certificate file: /etc/ssl/missing-ca.pem
Also printed as
- error setting certificate file: /etc/ssl/missing-ca.pem
Guzzle formats it as "cURL error 77: error setting certificate file: <path> (see https://curl.se/libcurl/c/libcurl-errors.html) for <url>"; curl_error() returns the part after "cURL error 77: ". Guzzle's own verify option fails earlier, with "SSL CA bundle not found: <path>", when the file is missing.
PHP ext-curl (Guzzle, Laravel HTTP client) — CURLE_SSL_CACERT_BADFILE: curl.cainfo names a file that cannot be loaded
What it means
libcurl could not load the CA bundle PHP told it to use, so no HTTPS request through ext-curl can be made. The path after the colon usually comes from curl.cainfo in php.ini (or CURLOPT_CAINFO set by code). Nothing was sent to the server.
Why it happens
A php.ini copied from another system
commonA curl.cainfo line written for another distribution, a Windows path, or a bundle that was never installed in this image.
Windows: the configured cacert.pem was moved or never downloaded
commonAfter PHP upgrades into a new folder, curl.cainfo often still points at the old installation.
The file is not readable by the PHP process
occasionalPHP-FPM workers run as a different user than your shell; a bundle readable only by root fails there.
How to fix it
- 1.
Find the setting and check the file
php --ini and php -i show which file sets curl.cainfo; check that the path exists for the user running PHP (FPM may load another php.ini than the CLI).
bash php --ini php -i | grep -E 'curl.cainfo|openssl.cafile' ls -l "$(php -r 'echo ini_get("curl.cainfo");')" - 2.
Point curl.cainfo at an existing bundle
Use the distribution bundle on Linux or a maintained cacert.pem on Windows, and reload PHP-FPM or the web server.
ini ; Linux (Debian/Ubuntu): the system bundle curl.cainfo = "/etc/ssl/certs/ca-certificates.crt" ; Windows: absolute path to an existing cacert.pem ; curl.cainfo = "C:\php\extras\ssl\cacert.pem"