Laravel 5 Socialite - cURL error 77: error setting certificate verify locations

后端 未结 21 1913
暖寄归人
暖寄归人 2020-12-02 18:36

I am using socialite in Laravel 5 to setup facebook login. I followed the instructions carefully until I got stuck with the following error

cURL error 60: SS         


        
相关标签:
21条回答
  • 2020-12-02 19:13

    My error is:

    cURL error 77: error setting certificate verify locations: CAfile: C:\xampp\apache\bin\curl-ca-bundle.crt CApath: none (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)


    This works well for me:

    1. Download the certificate from: https://curl.haxx.se/ca/cacert.pem
    2. Rename the cacert.pem file into curl-ca-bundle.crt
    3. Copy the file into path/to/xampp/apache/bin
    4. Restart apache
    0 讨论(0)
  • 2020-12-02 19:16
    1. Download from (https://curl.haxx.se/ca/cacert.pem)
    2. Change the name 'cacert.pem' to 'curl-ca-bundle.crt'
    3. In 'php.ini', remove ';' in the following line: curl.cainfo="C:\xampp\apache\bin\curl-ca-bundle.crt"

    That's worked for me.

    0 讨论(0)
  • 2020-12-02 19:16

    you did not read the error carefully, now read it carefully

    cURL error 77: error setting certificate verify locations: CAfile: D:\XAMPP\apache\bin\curl-ca-bundle.crt CApath: none (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

    it means you are missing a file called curl-ca-bundle.crt to verify certificate locations, so you just need to put this(curl-ca-bundle.crt) file into your XAMPP\apache\bin\ folder and everything is fine error 77 has gone.

    curl-ca-bundle.crt, to download the file you can use this link https://github.com/nirmalkumar98/nk

    0 讨论(0)
  • 2020-12-02 19:18

    i had the same problem. you have to open the file .pem or pem.txt with a simple editor (bloc-note) and past the (https://curl.haxx.se/ca/cacert.pem) in your file. you have to reload apache.

    0 讨论(0)
  • 2020-12-02 19:21
    1. Save this certificate (https://curl.haxx.se/ca/cacert.pem) as cacert.pem.txt in C:\xampp\php
    2. Add to php.ini:

      curl.cainfo = "C:\xampp\php\cacert.pem.txt"
      
    3. Don't forget to restart XAMPP (it won't work until it restarts)

    Then it works fine!

    0 讨论(0)
  • 2020-12-02 19:25

    You need to replace the existing certificate with the other one here. After that:

    • Extract and add it to xampp\php\ext
    • Open xampp\php\php.ini
    • Add this line curl.cainfo='location from the first step' to the end of the file.
    • Restart and it should be working now.

    This is the source link.

    0 讨论(0)
提交回复
热议问题