cURL error 60: SSL certificate prblm: unable to get local issuer certificate

Seeing I am using a local environment I can safely disable SSL, which i did using the following:

$guzzleClient = new \GuzzleHttp\Client(array( 'curl' => array( CURLOPT_SSL_VERIFYPEER => false, ), ));
$client->setHttpClient($guzzleClient);

Where $client is my Google_Client().


If you are on Windows using Xampp, I am stealing a better answer from here, would be helpful if Google shows you this question first.

  1. Download and extract for cacert.pem here (a clean file format/data)

    https://curl.haxx.se/docs/caextract.html

  2. Put it in :

    C:\xampp\php\extras\ssl\cacert.pem

  3. Add this line to your php.ini

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

  4. restart your webserver/Apache