TAG | SOAP
I have found a bug in PHP 5.2.6 related to SoapClient. If you pass a relative path of local_cert option to the SoapClient on Windows machines the client does not work and refuses to connect to the service. Actually this is my first bug to report and it got fixed. (I was worried I might be one of those annoying pests who report not bogus stuff) I’m happy I did a tiny itsy bitsy amount of good to PHP.
We couldn’t get soapclient with proxy working on our local machines. It was very lucky of me to find the following comment on php.net:
I kept having a problem using an HTTP proxy with SOAP. The proxy_port parameter has to be an integer, ie. "proxy_port" => "80" won't work, you'll have to use "proxy_port" => 80.
Incredibly hard to catch bugs like these. It’s probably a bug that should get reported. It would be nice to have a note in the documentation to warn other developers from experiencing the same problem.
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.