PHP CURL HTTPS Error: "SSL certificate problem: unable to get local issuer certificate"


Applies to:

Mac OSX mostly

Other Systems and Software using SSL



When you execute PHP CURL calls to HTTPS URLs, you might get the error:

SSL certificate problem: unable to get local issuer certificate

This means that the root certificates on the system are invalid.


You can fix the system certificate, deploy valid SSL root certificate to the system, or only to Zend Server PHP.

As kindly suggested by Peter Carlsson, here is a short recipe to fix PHP-CURL with working local certificate:

1. Downloaded cacert.pem from

2. Copy cacert.pem to '/usr/local/zend/etc/ssl/certs/'

3. Modify CURL configuration (Zend Server Configuration -> PHP -> CURL) and change:

curl.cainfo = '/usr/local/zend/etc/ssl/certs/cacert.pem'

4. Restart PHP and check if CURL can read from HTTPS URL.



Have more questions? Submit a request


Powered by Zendesk