Twilio PHP-SSL certificate: Self-signed certificate in certificate chain


jd182

I'm struggling with this error when trying to send a message through Twilio using its PHP library :

Fatal error: Uncaught exception Services_Twilio_TinyHttpException with message SSL certificate problem: self signed certificate in certificate chain thrown in F:\path\to\site\twilio-php\Services\Twilio\TinyHttp.php on line 119

I am using wamp on windows 7.

Of course I found all the other information about certificate errors. As far as I know, usually updating or adding cacert.pema file fixes the problem. However, even after doing this, I still get the same error.

Like the sanity check done here, this is what I did:

  1. Downloaded the latest certificate from here : http://curl.haxx.se/ca/cacert.pem .
  2. Put this file in the following locationc:/wamp/certs/cacert.pem
  3. Updated php.ini as follows:curl.cainfo = c:/wamp/certs/cacert.pem
  4. Restart all wamp services including Apache

And I still get the same error. I have verified that I am using to edit the correct php.ini phpinfo(). I don't know why it's still complaining.

Is there any way to 100% verify that my file was cacert.pemfound and read ? I have checked phpinfo()and there is no mention there. Should it say somewhere cacert.pemthat it is being used?

Thanks!

password monkey

I have the exact same problem

Follow these steps:

Download the following files -cacert.pem

Then download the following files -thawte_Premium_Server_CA.pem

Open the second file in a text editor and copy its contents to the first file ( cacert.pemat the bottom/end).

Save cacert.pemand add the following lines to your php.ini:

[curl]
curl.cainfo=c:/xampp/php/cacert.pem

Obviously, change directory to where your pem is. Restart php local server (xampp/wamp). Then it will work perfectly.

thanks.

Related


nodejs - wrong self signed certificate in certificate chain

Doyle: I'm having issues with client side https requests. Fragments can look like this: var fs = require('fs'); var https = require('https'); var options = { hostname: 'someHostName.com', port: 443, path: '/path', method: 'GET', key: fs.re

nodejs - wrong self signed certificate in certificate chain

Doyle: I'm having issues with client side https requests. Fragments can look like this: var fs = require('fs'); var https = require('https'); var options = { hostname: 'someHostName.com', port: 443, path: '/path', method: 'GET', key: fs.re

nodejs - wrong self signed certificate in certificate chain

Doyle: I'm having issues with client side https requests. Fragments can look like this: var fs = require('fs'); var https = require('https'); var options = { hostname: 'someHostName.com', port: 443, path: '/path', method: 'GET', key: fs.re

SSL - Self Signed Certificate with Wildcard

Niek Vandael I created a certificate with CN: *.hostname Chome and IE complain about this certificate when I navigate to dev.hostname or tst.hostname: Error in Chrome: NET::ERR_CERT_COMMON_NAME_INVALID Yes, I have added the certificate to Trusted Root CAs. Sho

SSL - Self Signed Certificate with Wildcard

Niek Vandael I created a certificate with CN: *.hostname Chome and IE complain about this certificate when I navigate to dev.hostname or tst.hostname: Error in Chrome: NET::ERR_CERT_COMMON_NAME_INVALID Yes, I have added the certificate to Trusted Root CAs. Sho

OpenSSL: Error "Self-signed certificate in certificate chain"

Lunar Mushrooms: When I use the openssl API to verify the server certificate (self-signed), I get the following error: Error 1 Deep Look 19: Self-signed certificate in certificate chain According to the openssl documentation , this error (19) is "X509_V_ERR_SE