Re: Http_request failing

From: Date: Tue, 09 May 2006 16:07:32 +0000
Subject: Re: Http_request failing
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-24023@lists.php.net to get a copy of this message
On 5/9/06, Ross Lawley <ross.lawley@gmail.com> wrote:
Hi, Doing a var_dump on the ErrorCheck object doesnt tell me much - but it might someone: Its as follows: [1]=> array(7) { ["file"]=> string(30) "/usr/share/pear/Net/Socket.php" ["line"]=> int(143) ["function"]=>
Indeed, as I thought the problem is in Socket.php line 143, which is a connection failure. You need to look into your PHP sockets setup (and probably allow URL fopen wrappers).
Connection problem: [pear_error: message="Permission denied" code=13 mode=return level=notice prefix="" info=""] On 5/9/06, Justin Patrin <papercrane@gmail.com> wrote: On 5/9/06, Ross Lawley <ross.lawley@gmail.com> wrote:
Hi all, I've got http_request installed and all set up and it looks fine using pear_info. However, when I do: $Request = & new HTTP_Request('http://www.yahoo.com'); // Send the request for the feed to the remote server $ErrorCheck = $Request->sendRequest(); // Check for errors if ( PEAR::isError($ErrorCheck) ) { die ( "Connection problem: ".$ErrorCheck->toString() ); } I get: Connection problem: [pear_error: message="Permission denied"
code=13
mode=return level=notice prefix="" info=""] But I can surf to www.yahoo.com fine in my browser, any pointers to
whats
the cause of the error?
Try printing the backtrace in the error object and see where the error is being thrown. Likely you're not allowed to use sockets in your PHP install. -- Justin Patrin
-- Justin Patrin

« previous php.pear.general (#24023) next »