cURL error 60: SSL certificate problem: unable to get local issuer certificate


  • | 190 points

    Enviroment
    Laragon Full v. 4.0.14
    SSL certificate enabled and correctly working.
    Fresh installation of wordpress.

    Behaviour
    When performing the "Site Health" process, Wordpress returns the following error:
    cURL error 60: SSL certificate problem: unable to get local issuer certificate

    On php.ini everything seems fine:

    ; A default value for the CURLOPT_CAINFO option. This is required to be an
    ; absolute path.
    curl.cainfo = "C:\laragon\etc\ssl\cacert.pem"
    

    Never happened before on a localhost enviroment. Any idea?!


  • administrators
    | 113071 points

    @lucagrandicelli : Can you update the cacert.pem? Here how:

    1. Download it:
      https://curl.haxx.se/ca/cacert.pem

    2. Replace C:\laragon\etc\ssl\cacert.pem with it

    3. Restart Apache/Nginx

    Source: https://stackoverflow.com/questions/29822686/curl-error-60-ssl-certificate-unable-to-get-local-issuer-certificate


  • | 190 points

    Already did that and the problem persists.
    Also tried to move the pem certificate inside the apache/ssl folder and use the openssl.cafile directive, but with no luck.
    Maybe something related to the CURL options and loopback (since we're ona local enviroment)?


  • | 205 points

    Having the exact same issue!


  • | 1118 points

    Reached here searching for a solution for this.


  • | 115 points

    Having the same issue after trying countless solutions. I tired to put the cacert.prem directly in the php folder as well:

    C:\laragon\bin\php\php-7.3.5-Win32-VC15-x64\extras\ssl

    Then updated in php.ini:

    curl.cainfo ="‪C:\laragon\bin\php\php-7.3.5-Win32-VC15-x64\extras\ssl\cacert.pem"
    openssl.cafile ="‪C:\laragon\bin\php\php-7.3.5-Win32-VC15-x64\extras\ssl\cacert.pem"

    Restarted and still same error. I did a curl command in CMD and it worked with no issue.


  • | 733 points

    I had the same problem until i realized that I had two php.ini files, one global under C:/php and other in Laragon.
    Be sure to edit the one in ‪C:\laragon\bin\php\


  • | 241 points

    Hi guys,
    I am experiencing the same issue, tried all the options listed here and the issue remains the same.
    so the problem still is how to make curl to find the "local ISSUER certificate"?

    Who is the local issuer and where should the cert be stored?


  • | 733 points

    @123conecta Try this:
    On the laragon window > Menu > Apache / Nginx > SSL > Add Laragon.crt to trust store.
    This can fix some problems for certificates created in other machines


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.