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

Jonjie's avatar
Level 12

cURL error 7 when running valet share

When running valet share, it is returning a curl error. Please see the error below.

In CurlFactory.php line 210: cURL error 7: Failed to connect to 127.0.0.1 port 4041 after 0 ms: Connecti on refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for htt p://127.0.0.1:4041/api/tunnels

I also tried to run ngrok authtoken [token], but it's still not working.

Any idea with this?

0 likes
3 replies
domioanna's avatar

Did you ever find a working solution to this? I'm still having the same issue and the solution @nakov mentions doesn't fix it...

Please or to participate in this conversation.