-
Notifications
You must be signed in to change notification settings - Fork 768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting "Error Fetching http body, No Content-Length, connection closed or chunked data" on some versions of PHP < 5.4.x. #24
Comments
@patekuru can this issue be closed? |
yes. sorry. On Wed, Mar 19, 2014 at 9:59 PM, Ray Tsang [email protected] wrote:
The content of this email is CONFIDENTIAL. |
no worries - cheers! |
This issue is valid, I'm working on a fix. Some versions of PHP (like 5.2) do not handle the HTTP 1.1 protocol's chunked data transfer mechanism/feature. We should do a check or something. |
Just Fyi, i personally DO currently have v201402 WORKING OK on my PHP 5.2.17 server. But, v201306, which i had had running on the same server for many months, had started to work intermittently (only about 1 out of 10 attempts), starting on about March 18th or 19th. This seemed ot me to have been related to google's technique of "strongly encouraging" upgrades to their newest "v" by gradually making the old "v" work intermittently in advance of the official sunset date. Since i solved it (apparently by upgrading from v201306 to v201402), i stopped digging around. this is just fyi, personally this issue is solved for me. |
Actually now the "Error Fetching http body, No Content-Length, connection closed or chunked data" has returned, still on PHP 5.2.17 server using v201402. The only thing i can think of might be that although my server & PHP scripts are a constant (unchanging) matter, whether or not the google API server returns a PHP 5.2.17 - compatible response varies. So yes, i agree this issue is valid. |
The clarify the issue, it is with some versions of PHP not handling decoding HTTP 1.1 responses when the response uses the chunked data mechanism. The fix for now is to do the following: In the file Google/Api/Ads/Common/Lib/SoapClientFactory.php, add the following line of code: This forces the client library to make requests with HTTP 1.0, which is not ideal. What you should do if you can is update your version of PHP to a version > 5.3 as this issue seems to occur in some versions of 5.3.x as well. This is a PHP language bug. |
Thanks! Btw even before i added $contextOptions['http']['protocol_version'] = 1.0; it started working again, but i've added it now, and i'll monitor whether it causes things to work 100% of the time, rather than just intermittently. |
Fixed in 5.2.2. |
This issue was invalid.
The text was updated successfully, but these errors were encountered: