Troubleshooting cURL error “Problem with the SSL CA cert (path? Access rights?)”

This morning when I checked the PHP script for automatic backup of WordPress to DropBox and I got the error message “Problem with the SSL CA cert (path? Access rights?)”, This problem has been going on for almost a month. 🙁 Luckily it gets caught now rather than late and does not have any backups.

So there are 3 related factors, namely cURL is used by PHP and interact with resource via TLS / SSL protocol. After finding out here and there I get one solution that can be applied immediately.

Before trying the way below please try to reboot your VPS first, just type reboot command and ENTER key followed in your shell. If it still fails also resolve this error then please try the solution below.

Please login to your VPS and download the SSL certificate bundle with cURL:

curl http://curl.haxx.se/ca/cacert.pem -o/etc/pki/tls/certs/cacert.pem

Then open the php.ini file (I use the nano text editor), then find curl.cainfo (look for it with CTRL + W in nano). If it is filled with the location of the file you just downloaded.

curl.cainfo = “/etc/pki/tls/certs/cacert.pem”

After that restart the PHP or PHP-FPM service that is running to use the new configuration. If in CentOS can with command:

service php-fpm restart

Please check again your troubled script, should be able to run again normally.

I hope this helps.

Leave a Reply

Your email address will not be published. Required fields are marked *