guzzle.phar - beginner problem ?

192 views
Skip to first unread message

scorpion king60

unread,
Feb 23, 2015, 1:27:31 PM2/23/15
to guz...@googlegroups.com
Hi 

I'm a beginner with h guzzle.
I copied  the the following exampe php code.

<?php
require_once "libs/guzzle.phar";   // transfered to my webhoster

$client = new GuzzleHttp\Client();
$response = $client->get('http://httpbin.org/get');

?>


But when I call it I got the following error:
Warning: curl_setopt_array() [function.curl-setopt-array]: Sorry, an internal error occured. Please report this immediately! (0) in phar:///users/quax/www/php/libs/guzzle.phar/GuzzleHttp/Ring/Client/CurlFactory.php on line52

Warning: curl_exec() [function.curl-exec]: Sorry, an internal error occured. Please report this immediately! (0) in phar:///users/quax/www/php/libs/guzzle.phar/GuzzleHttp/Ring/Client/CurlHandler.php on line 70

Fatal error: Uncaught exception 'GuzzleHttp\Ring\Exception\RingException' with message 'No response was received for a request with no body. This could mean that you are saturating your network.' in phar:///users/quax/www/php/libs/guzzle.phar/GuzzleHttp/Ring/Client/CurlFactory.php:126 Stack trace: #0 phar:///users/quax/www/php/libs/guzzle.phar/GuzzleHttp/Ring/Client/CurlFactory.php(520): GuzzleHttp\Ring\Client\CurlFactory::createErrorResponse(Object(GuzzleHttp\Ring\Client\CurlHandler), Array, Array) #1 phar:///users/quax/www/php/libs/guzzle.phar/GuzzleHttp/Ring/Client/CurlFactory.php(112): GuzzleHttp\Ring\Client\CurlFactory::retryFailedRewind(Object(GuzzleHttp\Ring\Client\CurlHandler), Array, Array) #2 phar:///users/quax/www/php/libs/guzzle.phar/GuzzleHttp/Ring/Client/CurlFactory.php(90): GuzzleHttp\Ring\Client\CurlFactory::createErrorResponse(Object(GuzzleHttp\Ring\Client\CurlHandler), Array, Array) #3 phar:///users/quax/www/php/libs/guzzle.phar/GuzzleHttp/Ring/Client/CurlHandler.php(77): GuzzleHttp\Ring\Client\CurlFactory::createResponse(Object(GuzzleHttp\Ring\Client\CurlHandler), Array, Array, Array, Resource id #92) #4 phar:///users/quax/www/php/libs/guzzle.phar/GuzzleHttp/Ring/Client/Middleware.php(54): GuzzleHttp\Ring\Client\CurlHandler->__invoke(Array) #5 phar:///users/quax/www/php/libs/guzzle.phar/GuzzleHttp/Ring/Client/Middleware.php(30): GuzzleHttp\Ring\Client\Middleware::GuzzleHttp\Ring\Client\{closure}(Array) #6 phar:///users/quax/www/php/libs/guzzle.phar/GuzzleHttp/RequestFsm.php(129): GuzzleHttp\Ring\Client\Middleware::GuzzleHttp\Ring\Client\{closure}(Array) #7 phar:///users/quax/www/php/libs/guzzle.phar/GuzzleHttp/Client.php(232): GuzzleHttp\RequestFsm->__invoke(Object(GuzzleHttp\Transaction)) #8 phar:///users/quax/www/php/libs/guzzle.phar/GuzzleHttp/Client.php(192): GuzzleHttp\Client->send(Object(GuzzleHttp\Message\Request)) #9 /users/quax/www/php/util.php(7): GuzzleHttp\Client->get('http://httpbin....') #10 {main} Next exception 'GuzzleHttp\Exception\RequestException' with message 'No response was received f inphar:///users/quax/www/php/libs/guzzle.phar/GuzzleHttp/Exception/RequestException.php on line 51



What is wrong here ?
Is guzzle.phar not supported ?

regards




Reply all
Reply to author
Forward
0 new messages