Cara memperbaiki cURL error 60: SSL certificate problem: unable to get local issuer certificate
Error yang biasa kita dapatkan seperti ini :
Fatal error: Uncaught exception 'GuzzleHttp\Exception\RequestException' with message 'cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)' in D:\handita\htdocs\test\scraper\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:187 Stack trace: #0 D:\handita\htdocs\test\scraper\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php(150): GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\Handler\EasyHandle), Array) #1 D:\handita\htdocs\test\scraper\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php(103): GuzzleHttp\Handler\CurlFactory::finishError(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory)) #2 D:\handita\htdocs\test\scraper\vendor\guzzlehttp\guzzle\src\Handler\CurlHandler.php(43): GuzzleHttp\Handler\CurlFactory::finish(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory)) #3 D:\handita\htdo in D:\handita\htdocs\test\scraper\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 187
Untuk mengatasi masalah koneksi ini di php anda harus mengeset certificatenya dulu. Carany download sertifikatnya dulu di sini
https://curl.haxx.se/ca/cacert.pem
Setelah itu taruh filenya di
C:\xampp\php\extras\ssl\cacert.pem
Setelah itu taruh configurasi php.ini seperti berikut :
;;;;;;;;;;;;;;;;;;;;
; php.ini Options ;
;;;;;;;;;;;;;;;;;;;;
curl.cainfo = "C:\xampp\php\extras\ssl\cacert.pem"
Semoga bermanfaat