The Developer Day | Staying Curious

TAG | web-services

Aug/07

17

PHP SoapClient certificate problems

I’ve been working with SoapClient and certificates for some time. I recently switched my old workstation to a new one and while working with a piece of code that seemed to work fine I got an error like this:

Unable to set local cert chain file `filename.pem’; Check that your cafile/capath settings include details of your certificate and its issuer in somescript.php on line ##

I tried to google what the problem might be and found a comment that you can get this error if you have curl extension disabled. But in my case it was enabled and working fine. I tried to remember what extensions I had enabled on my previous box and after a few thoughts I decided to enable mcrypt extension which seems related to crypted certificates and after restarting my webserver everything started working fine.

The php soapclient documentation does not mention anything that soapclient is dependency related to curl or mcrypt.

, , , , , Hide

Find it!

Theme Design by devolux.org