Score:0

PHP cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)

cn flag

I am getting curl error as

cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://.........

I am testing it on ubuntu 20.04 LAMP stack.

I have downloaded cert and placed it at:

/etc/ssl/certs/cacert.pem

and updated php.ini located at etc/php/7.4/apache2/php.ini and etc/php/7.4/cli/php.ini

curl.cainfo ="/etc/ssl/certs/cacert.pem"
openssl.cafile="/etc/ssl/certs/cacert.pem"
openssl.capath="/etc/ssl/certs/cacert.pem"

These three lines I added in both cli/php.ini as well as apache2.ini and then restarted apache2 with sudo service apache2 restart, infact I have rebooted several times as well.

Also, when I check openssl_get_cert_locations() It shows:

array:8 [▼
  "default_cert_file" => "/usr/lib/ssl/cert.pem"
  "default_cert_file_env" => "SSL_CERT_FILE"
  "default_cert_dir" => "/usr/lib/ssl/certs"
  "default_cert_dir_env" => "SSL_CERT_DIR"
  "default_private_dir" => "/usr/lib/ssl/private"
  "default_default_cert_area" => "/usr/lib/ssl"
  "ini_cafile" => "/etc/ssl/certs/cacert.pem"
  "ini_capath" => "/etc/ssl/certs/cacert.pem"
]
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.