hi . I want to develop my app on localhost using php language and I using guzzle package . problem is when i send my request
$client = new Client();
$client->request('GET', $moviesListUrl);
There is no problem with the url, and if I open it directly in the browser, everything is fine. But if I run the code, it will show up
Fatal error: Uncaught GuzzleHttp\Exception\ConnectException: cURL error 7: Failed to connect to api.themoviedb.org port 443: Connection refused (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) in E:\Local\Wamp\Projects\MobMovie\MobMovie\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:185 Stack trace: #0 E:\Local\Wamp\Projects\MobMovie\MobMovie\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php(149): GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\Handler\EasyHandle), Array) #1 E:\Local\Wamp\Projects\MobMovie\MobMovie\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php(102): GuzzleHttp\Handler\CurlFactory::finishError(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory)) #2 E:\Local\Wamp\Projects\MobMovie\MobMovie\vendor\guzzlehttp\guzzle\src\Handler\CurlHandler.php(43): GuzzleHttp\Handler\CurlFactory::finish(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory)) in E:\Local\Wamp\Projects\MobMovie\MobMovie\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 185
it is possible to get results from localhost ? can you help me ?
Can't find a movie or TV show? Login to create it.
Want to rate or add this item to a list?
Not a member?
Reply by Travis Bell
on April 20, 2018 at 10:31 AM
Hi @zoban,
Yes, it is possible to dev from localhost. With regards to the cURL error, are you able to enable some type of more verbose logging? Something that can show you what cURL is having an issue with more specifically? A connection refused error is telling me cURL can't connect to port 443 so another though could be that cURL isn't setup to connect on that port.
Have you tried not using https and seeing if connecting to port 80 is ok?
Reply by onlinewatchit
on September 16, 2022 at 12:39 PM
I am also getting this error in laravel. I am a developer this error occur 7 time out of 10 request. sometime working some not!
Reply by ticao2 š§š· pt-BR
on September 16, 2022 at 5:39 PM
Please post the information requested by administrator Travis Bell here.
They are in the comment before yours.