Level 3
I also tried set_time_limit(0); But it's also giving the same error !
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi,
I'm currently downloading image from the woocommerce API which uses the CURL. I kept default timeout to forever, still it shows this error.
[Automattic\WooCommerce\HttpClient\HttpClientException]
Error: Error getting remote image https://s3.ap-south-1.amazonaws.com/productimages1234/images/elega
ntayeshav5-01.jpg. Error: cURL error 28: Operation timed out after 9874 milliseconds with 3167876 ou
t of 3573589 bytes received. [woocommerce_api_invalid_remote_product_image]
My CURL settings:
\curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, 0);
\curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, 0);
\curl_setopt($this->ch, CURLOPT_CONNECTTIMEOUT, 0);
\curl_setopt($this->ch, CURLOPT_TIMEOUT, 0);
\curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, true);
\curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, true);
\curl_setopt($this->ch, CURLOPT_HTTPHEADER, $this->request->getRawHeaders());
\curl_setopt($this->ch, CURLOPT_URL, $this->request->getUrl());
Any idea why I'm getting this error ?
Thanks!
Please or to participate in this conversation.