PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » HTTP » HTTP_Client » Bug #5973

HTTP Client returns NULL on every fetched URL

Details

Submitted2005-11-15 20:49 UTC
Frominfo at e-novative dot de
StatusBogus
PackageHTTP_Client
PHP Version5.0.5
OSWin XP
Roadmaps(Not assigned)

Comments

[2005-11-15 20:49 UTC] info at e-novative dot de

Description:
------------
Since my upgrade to PHP 5.0.5 and PEAR 1.4 HTTP_Client returns NULL on every URL fetched (though URL is on localhost and valid).

My PEAR installation looks like this:

INSTALLED PACKAGES, CHANNEL PEAR.PHP.NET:
=========================================
PACKAGE VERSION STATE
Archive_Tar 1.3.1 stable
Benchmark 1.2.4 stable
Console_Getopt 1.2 stable
DB 1.7.6 stable
HTTP_Client 1.0.0 stable
HTTP_Request 1.3.0 stable
Log 1.9.2 stable
Mail 1.1.9 stable
Net_SMTP 1.2.7 stable
Net_Socket 1.0.6 stable
Net_URL 1.0.14 stable
PEAR 1.4.4 stable
PEAR_PackageFileManager 1.5.2 stable
PHPUnit 1.3.2 stable
PHPUnit2 2.3.3 stable
PhpDocumentor 1.3.0RC3 beta
XML_Parser 1.2.7 stable
XML_RPC 1.4.4 stable
phing 2.1.1 stable

Test script:
---------------
require_once 'HTTP/Client.php';
$cl = new HTTP_Client();
$cl->get('http://localhost/');
$r = $cl->currentResponse();
var_dump($r);

Expected result:
----------------
Some HTML page

Actual result:
--------------
NULL

[2005-11-15 21:39 UTC] info at e-novative dot de

Did that, same thing.

I have tested the same thing on PHP 5.0.4 on another WinXP and it works (as it always did). I compared php.ini but found no relevant differences between my 5.0.4 and my 5.0.5.

The other machine has HTTP_Request 1.2.3 on it but I tried with 1.2.3 (temporarily substituting the Request.php and its Listener.php on this machine) - same result.

[2005-11-15 21:42 UTC] info at e-novative dot de

Sorry, I messed this one up (added the line after the call to get method). With PEAR_ERROR_DIE it says "Malformed Response".

[2005-11-15 22:22 UTC] info at e-novative dot de

I did some debugging in HTTP_Request and Net_Socket and found the problem. Seems like a broken version of Net_Socket was on the one system. It's fixed now.

Sorry to bother, and thanks for the quick response.