Zend_Http_Client_Adapter_Socket Problems

Note: This article was originally written on reich-consulting.net. Reich Web Consulting has narrowed its focus to the web and no longer offers tech support services, so we’ve moved all of our tech support content off-site. We hope you find this article useful. It is provided as-is, and we will no longer provide support on this topic.

While running my unit tests for an application I’m developing, I noticed that certain web service components were intermittently failing. The failure was caused by irregularly formed XML responses from Amazon’s Web Services. The failures occured as Exceptions from within the Zend_Service_Amazon component, but upon further inspection I was able to discover that the HTTP Adapter being used from within Zend_Service_Amazon, which is by default Zend_Http_Client_Adapter_Socket, was not returning the entire stream from Amazon. After I switched adapters to Zend_Http_Client_Adapter_Curl, my unit tests began running without fail.

I was not able to find any information about the problem from the Zend Framework Issue Tracker, so I have no way of knowing at the moment if there is a bug within the Socket adapter, or something with my computer or my Internet connection.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store