ErrorException failed loading cafile stream: `\xampp\apache\bin\curl-ca-bundle.crt’

This error occurs due to the curl library in your XAMPP setup cannot find the certificate authority (CA) file (curl-ca-bundle.crt). The certificate authority (CA) file is required for establishing secure connections via cURL.

Following are the steps to resolve:

Step 1: Verify the Path

Make sure the curl-ca-bundle.crt file available in the specified location (\xampp\apache\bin\). If it’s not available, you can:

  1. Download a CA bundle from curl.haxx.se.
  2. Put and Save the file as curl-ca-bundle.crt in the \xampp\apache\bin\ directory.

Step 2: Update the PHP Configuration

  1. Open the exiting php.ini file (located in \xampp\php\php.ini).
  2. Find the curl.cainfo directive.
  3. Update the directive to point to the curl-ca-bundle.crt file, e.g.:

curl.cainfo = "C:\xampp\apache\bin\curl-ca-bundle.crt"

Similarly, find the openssl.cafile directive and update it:


openssl.cafile = "C:\xampp\apache\bin\curl-ca-bundle.crt"

Step 3: Restart Apache

Restart the Apache server from the XAMPP Control Panel.

Leave a Comment