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

后端 未结 21 1912
暖寄归人
暖寄归人 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:26

    i had this problem in windows 2012

    i had a virtual dedicated server that host for laravel

    then i had this error and

    • download that file from here
    • put in my extras folder in php 7.2
    • in my php.ini file find this line

      [curl]

      ; A default value for the CURLOPT_CAINFO option. This is required to be an

      ; absolute path. curl.cainfo = extras/ssl/cacert.pem

    • i paste my download file into php file sth like this:

    curl.cainfo = "C:\Program Files (x86)\PHP\v7.2\extras\ssl\cacert.pem"

    • then save php.ini
    • then restart my iis or just website

    in my case i just restart my website

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

    I read every thread I could find and this one provided the missing piece.

    Background: I encountered this issue will trying to get Drupal 8 to check for available updates on a fresh development environment (wamp based).

    1. Get a copy of the Certificate data from Mozilla, it can be found here: https://curl.haxx.se/ca/cacert.pem If you want to know more about what this is read this: https://serverfault.com/questions/241046/what-is-the-cacert-pem-and-for-what-to-use-that
    2. Save the file as "cacert.pem.txt" not as "cacert.pem" This was the missing piece, thanks LyleK!. I have no clue why but you must have the .txt extension on the end or it does not work.
    3. Explicitly add the path to the location of the "cacert.pem.txt" file to your php.ini

    Example:

    [curl]
    ; A default value for the CURLOPT_CAINFO option. This is required to be an
    ; absolute path.
    curl.cainfo = "C:\wamp\custom\cacert.pem.txt"
    

    If you are using a wamp stack restart it. You should be good to go.

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

    It seems you forgot to add quote for the file path. I was got the same error (77), that was because i forgot to add quotes. I solved the problem by adding that. ex: "C:\AppServ\php\cacert.pem"

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

    If anyone is running Windows with Plesk and they get this error.

    You must ensure that the curl.cainfo path is inside the Plesk PHP directory otherwise you will get the error above even with the fix.

    curl.cainfo = "C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP55\extras\ssl\cacert.pem.txt"
    

    Fixed for me. Hope this helps someone, someday, somewhere.

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

    I had the same issue and i tried every solution mentioned here and on other posts but none of them worked. I tried
    1) Setting proper file rights ( didn't work )
    2) Changing file extension ( didn't work)


    then i moved the cacert.pem file inside php/ directory in xampp and restarted it, it worked. Hope it helps someone.

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

    Add cacert.pem file from https://curl.haxx.se/ca/cacert.pem in c:\xampp\php\cacert.pem

    Change setting in php.ini file:

    curl.cainfo = "C:\xampp\php\cacert.pem

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