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
    | 111224 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.


  • | 586 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\


Log in to reply
 

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