1 year ago

Why do I get random "SSL certificate problem" error

Posted 1 year ago by agilasadi

I'm aware that the similar questions were asked but mine is differentiating and I could not find a matching answer.

The problem occurs when I'm trying to register users with social media options, or when I'm trying to do request to google for reCaptcha. In case of reCaptcha, it's acceptable since I due to a cURL request which can lead to an issue related with certification, But I could not find the reason why I get the error when I'm trying to register the user with Google or Facebook.

I tried to placing cacret.pem into PHP folder and linking it in the php.ini it was working for about 3 months and suddenly decided to not work. In this case, I'm not sure which part of the code I should share because I don't know what causes the error since I do not call Guzzle in any stage of social media registration. But since I use socialite, it might be using guzzle for doing requests.


try {

$googleUser = Socialite::driver('google')->user();
$existUser = User::where('email',$googleUser->email)->first();

if($existUser) {
else {

    $user = new User;

    $user->name = $googleUser->name;
    $user->email = $googleUser->email;
    $user->password = str_random(40);

    $account = new SocialMediaAccount([
        'provider_user_id' =>  $googleUser->id,
        'provider' => 'google'



return redirect()->to('/home');
catch (Exception $e) {
        return 'error';

ENTIRE ERROR: "cURL error 60: SSL certificate problem: unable to get local issuer certificate (see

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