curl: (60) SSL certificate problem: unable to get local issuer certificate

Relating to ‘SSL certificate problem: unable to get local issuer certificate’ error. It is important to note that this applies to the system sending the CURL request, and NOT the server receiving the request.

  1. Download the latest cacert.pem from https://curl.se/ca/cacert.pem

  2. Add the ‘–cacert /path/to/cacert.pem’ option to the curl command to tell curl where the local Certificate Authority file is.

  3. (or) Create or add to a ‘.curlrc’ file the line:
    cacert = /path/to/cacert.pem
    See ‘man curl’, the section about the ‘-K, –config <file>’ section for information about where curl looks for this file.

  4. (or if using php) Add the following line to php.ini: (if this is shared hosting and you don’t have access to php.ini then you could add this to .user.ini in public_html).

curl.cainfo="/path/to/downloaded/cacert.pem"

Make sure you enclose the path within double quotation marks!!!

  1. (perhaps also for php) By default, the FastCGI process will parse new files every 300 seconds (if required you can change the frequency by adding a couple of files as suggested here https://ss88.uk/blog/fast-cgi-and-user-ini-files-the-new-htaccess/).

Leave a Comment