A cURL certificate verification error means that the client could not establish trust in the HTTPS server’s certificate. On Windows, the correct fix depends on the cURL or PHP build and the trust store it uses.
Check the error and remote certificate
Record the exact error and destination URL. Check the system clock, certificate expiry, hostname coverage and the server’s intermediate certificate chain. A missing server intermediate certificate should be corrected at the remote server.
For command-line cURL, inspect its build:
curl.exe --versionA Schannel build normally uses the Windows certificate store. A file-based TLS backend may need a current CA bundle. PHP’s cURL extension can use a different build and configuration from curl.exe.
Configure a file-based PHP trust store
If the PHP build requires a CA bundle, obtain it from the official cURL CA Extract page or an appropriate administrator-managed trust source. Store it outside the public website directory and make it readable by the PHP process.
An administrator can set an absolute path in the php.ini actually loaded by that website’s PHP version:
curl.cainfo = "C:/PHP/cacert.pem"
openssl.cafile = "C:/PHP/cacert.pem"Replace the example with the real protected path. openssl.cafile concerns PHP’s OpenSSL operations; it is not a replacement for cURL’s setting. Do not point openssl.capath at an ordinary PHP directory without the required hashed certificate layout.
Apply and verify
Reload or recycle the affected PHP process through the hosting platform, then repeat the request with verification enabled. On shared hosting, ask the provider to configure the trust store: curl.cainfo is a system-level setting and cannot necessarily be changed through a site’s .user.ini.
Do not disable peer or hostname verification to make the request succeed. That hides the trust problem and allows an untrusted server to impersonate the destination.
Remove any temporary diagnostic page that exposes PHP configuration after checking the loaded settings.