How to fix the Curl Error: error setting certificate verify locations
CentOS5, Web Development No Comments »Today I had a new server running CentOS5 have trouble with a known good authorize.net library using curl. It was producing the following error:
error setting certificate verify locations: CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none
After some research I found it was based on the inability for the apache user to access the ca-bundle.crt file. You will find solutions on the web suggesting adding curl_setopt($link, CURLOPT_SSL_VERIFYPEER, FALSE); to your script to disable the peer verification — I suggest you not do this and simply fix the permissions for your CA file.
Execute this:
/bin/chmod 755 /etc/pki/tls/certs
Solved!

Recent Comments