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

imJohnBon's avatar

cURL call 504'ing in Homestead

Odd problem here. I'm trying to make an API call using the cURL functions in PHP (curl_init(), curl_setopt(), etc). And it works perfectly fine in my local machines virtual host.

However when I try to do it as a test from inside a view on a Laravel 5 instance running on homestead, the page 504 Gateway Time-outs every single time. Is there something I'm unware of about making an API call from a VM?

0 likes
2 replies
imJohnBon's avatar

The call is working from outside Homestead on the same build, so it's definitely related to Homestead.

imJohnBon's avatar
imJohnBon
OP
Best Answer
Level 5

As a follow up here, this ended up being due to the specific API I was trying to connect to requiring SSLv3. Which I specified in PHP like so:

curl_setopt($ch, CURLOPT_SSLVERSION, 3);

1 like

Please or to participate in this conversation.