Twilio PHP helper library SSL certificate problem on Windows

When using the Twilio PHP Helper Library on Windows, you may receive an error similar to the following:

Fatal error: Uncaught exception 'Services_Twilio_TinyHttpException' with message 'SSL certificate problem: self signed certificate in certificate chain'

The php_curl library on Windows doesn't use an up-to-date list of CA Root Certificates. You can get a pem file of the root certificates from the curl site below.

To fix this issue please try the following:

1. Download the following pem file: https://curl.haxx.se/ca/cacert.pem

2. Copy this file to c:\cert\cacert.pem

3. Open php.ini file in your favorite editor (see here for where to find it)

4. If the following configuration string: curl.cainfo exists in your php.ini, please uncomment it by removing ";" and modify the path in order to point it to the cacert.pem file you downloaded, e.g:

;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;
curl.cainfo=c:\cert\cacert.pem

5. Restart your Apache or IIS service to apply the change.

Have more questions? Submit a request
Powered by Zendesk