Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

javineo's avatar

Guzzle and problem in port:80

I have not been able to discover what problem my code has.

I have an API made in Laravel, which for security reasons I access from port 7744 on the web front, when consulting it from another site, I get the error

'cURL error 7: Failed to connect to http: // myhost: 7744 / api / v1 / port 7744: Connection refused'

if I return to enable port 80 then it works. Can someone guide me in the solution?

0 likes
4 replies
shez1983's avatar

from that api server, you need to allow access (firewall ) so people can access that port?

80 is open by default you need to do something similar for that port.. (which i am not an expert on, google ubuntu firewall or something)

if using forge, you can create rules through their interface

gregrobson's avatar

OMG! I had almost the exact same problem with using Pipedrive's API today! Strange coincidence!

In my case URLs such as https://companyname.pipedrive.com/v1/deals:(id)?api_token=mytoken would end up with the scheme being deals and not https. I was only able to work this out as I had a middleware and could check the $request object before it was sent out. https://stackoverflow.com/a/47161852/1579386

In my case the : being used after the end of the domain name is non-standard and not part of the URI specification. I would have thought it would have worked after the hostname though?

If you can attach a middleware to your Guzzle client then I would try doing a dd() on the request and check the scheme, domain, path and query string properties as they are being sent out.

There are some closed issues relating to this on the Guzzle issue board - they seem to hint at being a PHP issue with how it parses strings.

gregrobson's avatar

On second thoughts - you might just have a firewall issue. Can you access a simple test page on that port?

javineo's avatar

Yes!! Not only can I access a page in that port but I test my API with Postman and answer in that port, I'm really baffled !!

a little help for a friend?

Please or to participate in this conversation.