After scouring the web, I really am at my wit's end. I know this question has been asked several times but none of the solutions solve my problem. I'd like to know if there are any other known reasons for curl error 60: "SSL certificate problem, verify that the CA cert is OK".
I have set CURLOPT_CAINFO to the pem file (also tried crt) and I have checked for insufficient permissions when trying to access pem file.
Here's the code by the way:
$url = 'https://example.com/';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_CAINFO, "/usr/local/apache2/htdocs/server/html/cacert.pem");
$response = curl_exec($ch);
...do something
curl_close($ch);