Re: pecl_http unsuppressible error messages
| From: | Michael Wallner | Date: | Thu, 06 Mar 2008 11:49:02 +0000 |
| Subject: | Re: pecl_http unsuppressible error messages | ||
| References: | 1 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-5164@lists.php.net to get a copy of this message | ||
Brian Thompson wrote:
> $response = @http_head($url, array("timeout"=>1), $info);
> $parsedResponse = http_parse_headers($response);
> echo "responseCode = " . $parsedResponse['Response Code'] .
> ";\n";
> echo "responseStatus = '" . $parsedResponse['Response Status'] .
> "';\n";
>
> //} catch(Exception $e) {
> // //handle error
> //}
>
> With or without the '@', with or without the commented lines, I consistently get
> the PHP error table giving the following message before my echoed text appears:
Works fine here:
mike@waldrapp:~$ php -r 'error_reporting(E_ALL);
http_head("http://service01",
array("timeout"=>0.1));'
Warning: http_head(): a timeout was reached; a timeout was reached
(http://service01/) in Command line code on line 1
mike@waldrapp:~$ php -r 'error_reporting(E_ALL);
@http_head("http://service01",
array("timeout"=>0.1));'
mike@waldrapp:~$
MAybe you've any custom error handler defined?
Mike