in PHP, Server Side

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

Setiap kali kalau pakai cURL di lokal environment selalu muncul ini. Cara biasanya tinggal nambahin opsi di cURL untuk mengabaikan otentifikasi sertifikat SSL. Tapi berhubung nyoba pake library jadinya harus edit environment. Kebetulan pakai Xampp jadi banyak tutorialnya.

XAMPP server

similar for other environment – download and extract for cacert.pem here (a clean file format/data)

https://gist.github.com/VersatilityWerks/5719158/download

  • put it here

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

  • in your php.ini put this line in this section:

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

  • restart your webserver/apache

Write a Comment

Comment