cURL on Windows: problems with SSL certificates

Sometimes, the following warning may be seen when running an extension that uses cURL on Windows.

SSL certificate problem: unable to get local issuer certificate

This is due to the fact that libcurl shipped with PHP is built without the support for the Windows certificate store, and so cURL cannot use it.

  1. Download a current certificate

  2. Place the certificate file anywhere inside the extension folder

    For example, it can be placed inside the externals folder: PATH_TO\plib\library\externals\cacert.pem


  3. Add the path to the certificate file in cURL options array