Chris Schuld's Blog

personal musings on the composition of software

Written By: Chris Schuld Friday, July 11th, 2008

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!

Categories: CentOS5, Web Development

2 Responses to " How to fix the Curl Error: error setting certificate verify locations "

  1. Chris Jones says:

    Hello,

    I am having issues with this error:
    Error: Cannot execute request: error setting certificate verify locations:
    CAfile: /Applications/MAMP/htdocs/certification.cer
    CApath: none

    I’ve tried permissions. On my Mac 10.5 I can change the permissions for 755 to read and write. on Mac 10.4 I cannot. I used terminal. and inputed this:
    /bin/chmod 755 /Applications/MAMP/htdocs/certification.cer

    is this the write code? I also created a file with the cer at the end of the name as shown upbove. Is this permitted?

    any help would be very appreciated.

    I am working on WordPress page running MAMP using LocalHost to edit page

    thanks

    Chris

  2. Dale says:

    Thank you, saved me a bunch of time fighting CentOS!

Leave a Reply

About Chris

Chris Schuld

Thank you for visiting my website. I use this site for a myriad of things: maintaining software I have open sourced, connecting with my readers and friends and documenting all of this little things "I wished I would have written down." You can read more about me or contact me.


thanks for visiting... happy coding

Recent Comments