GithubHelp home page GithubHelp logo

Getting "Error Fetching http body, No Content-Length, connection closed or chunked data" on some versions of PHP < 5.4.x. about googleads-php-lib HOT 10 CLOSED

googleads avatar googleads commented on August 16, 2024
Getting "Error Fetching http body, No Content-Length, connection closed or chunked data" on some versions of PHP < 5.4.x.

from googleads-php-lib.

Comments (10)

saturnism avatar saturnism commented on August 16, 2024

@patekuru can this issue be closed?

from googleads-php-lib.

patekuru avatar patekuru commented on August 16, 2024

yes. sorry.

On Wed, Mar 19, 2014 at 9:59 PM, Ray Tsang [email protected] wrote:

@patekuru https://github.com/patekuru can this issue be closed?

Reply to this email directly or view it on GitHubhttps://github.com//issues/24#issuecomment-38128434
.

The content of this email is CONFIDENTIAL.

from googleads-php-lib.

saturnism avatar saturnism commented on August 16, 2024

no worries - cheers!

from googleads-php-lib.

vtsao avatar vtsao commented on August 16, 2024

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.

from googleads-php-lib.

patekuru avatar patekuru commented on August 16, 2024

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.

from googleads-php-lib.

patekuru avatar patekuru commented on August 16, 2024

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.

from googleads-php-lib.

vtsao avatar vtsao commented on August 16, 2024

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,
right before line 147 where the line says "$options['stream_context'] = stream_context_create($contextOptions);"

add the following line of code:
$contextOptions['http']['protocol_version'] = 1.0;

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.

from googleads-php-lib.

patekuru avatar patekuru commented on August 16, 2024

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.

from googleads-php-lib.

vtsao avatar vtsao commented on August 16, 2024

A fix is on the way. FYI threads of interest:
https://groups.google.com/forum/?fromgroups#!topic/google-doubleclick-for-publishers-api/RO4baJdTZhg
https://groups.google.com/forum/?fromgroups#!topic/google-doubleclick-for-publishers-api/Dvl5Zn38e1Y

from googleads-php-lib.

vtsao avatar vtsao commented on August 16, 2024

Fixed in 5.2.2.

from googleads-php-lib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.