How to solve cURL error 60: SSL certificate in Laravel 5 while Facebook authentication

Published 3 years ago by eddy1992

I am using socialize for Facebook authentication, But I got cURL error Mentioned below.

RequestException in CurlFactory.php line 162:
cURL error 60: SSL certificate problem: unable to get local issuer certificate (see

My controller :


namespace App\Http\Controllers;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;
use Socialite;

class AccountController extends Controller
    public function facebook_redirect() 

        return Socialite::with('facebook')->redirect();

    public function facebook()
         $user = Socialite::with('facebook')->user();

please help Thank you :)


Does anybody know what could be the problem ? Please help :(


@eddy1992 what version of guzzlehttp/guzzle are you using?

3 years ago (1,002,020 XP)

What DNS are you using? If you're using local/router you could change it to use public DNS like Google, Level3 etc


i solve it by remove the guzzlehttp/guzzle version 6 and install guzzlehttp/guzzle version 4


@samsoft I am using "laravel/socialite": "~2.0" in composer.json and yes @pixelpeter I am using windows


@bashy I use the option Obtain DNS server address automatically and yes I use local router.

3 years ago (1,002,020 XP)

Yeah you could try using a public DNS for developing. Which is why I use a VM so I can set this up separately!

If I use local DNS, it fails. If I use Google's, it works.


If someone is still looking for a solution, there is an easy fix:

Go to and download the pem file and save in your php installation directory ( make sure while saving it retains the extension and not saved as a text file )

Now, open your php.ini file, scroll to the bottom and add the following line:


Replace D:\xampp\php\cacert.pem with the actual path.





I have download the caert.pem file and save it in C:\wamp\bin\php\php5.5.12, with the proper extension. Next I modified and uncomment the next line:

curl.cainfo = "c:/wamp/bin/php/php5.5.12/cacert.pem"

But it still doesn't work.

EDIT: We have to modify C:\wamp\bin\apache\apache2.4.9\bin\ if we use wampserver (instead of C:\wamp\bin\php\php5.5.12\).


(Using XAMPP version 7.0.9 on Windows 10.) After 50 minutes of searching and trying things, it was a single line fix:

Edit C:\xampp\php\php.ini and add the line:

curl.cainfo = "C:/xampp/apache/bin/curl-ca-bundle.crt"

Oddly I didn't even have to update curl-ca-bundle.crt to a new version. Just needed that setting set.

Edit: AND restart Apache! :smiley:


I have just signed for this forum just to commend @wmhilton . I have searched for the solution for this problem for days and yours was the best. Thank you boss! Saved me hours


In case someone is using Wamp server, the right file is located in: "C:\wamp\bin\apache\apache\bin\php.ini"


I tried it without a php artisan serve. Loaded the file directly from my wamp/www folder and it works fine

Please sign in or create an account to participate in this conversation.