'PHP curl getting self signed certificate in certificate chain erro, but cert valid

I've tried setting curl.cainfo option. But it not affected at all. Also, i prefer avoid using CURLOPT_SSL_VERIFYHOST. Cert is showing up as fully valid in browser and other utilities. Only in PHP curl I'm getting this error.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source