It depends on what timeout setting you are talking about.
cURL offers various options related to connection timeout settings. Some of these options have a set limit, while others allow you to carry an unlimited amount of time. To understand what the default settings are and which are not, you need to look at the libcurl curl_easy_setopt() function: http://curl.haxx.se/libcurl/c/curl_easy_setopt.html
libcurl lists the following connection timeout settings:
- CURLOPT_FTP_RESPONSE_TIMEOUT: default (undefined)
- CURLOPT_TIMEOUT: default (undefined)
- CURLOPT_TIMEOUT_MS: default (undefined)
- CURLOPT_CONNECTTIMEOUT: default to 300 seconds
- CURLOPT_CONNECTTIMEOUT_MS: default
- CURLOPT_ACCEPTTIMEOUT_MS: default 60,000 ms
The PHP source code does not override any default settings: https://github.com/php/php-src/blob/master/ext/curl/interface.c . The only parameter associated with overriding PHP bindings is CURLOPT_DNS_CACHE_TIMEOUT , changing the default value from 60 seconds to 120 seconds: https://github.com/php/php-src/blob/a0e3ca1c986681d0136ce4550359ecee2826a80cface/cur.face
One answer indicated that PHP would set CURLOPT_TIMEOUT value specified in the default_socket_timeout ini setting. I could not find anything in the PHP source code to back up this application, and I was not able to call the cURL timeout by downloading a very large file with the default_socket_timeout setting for 1 second.
Michael Dowling Apr 12 '13 at 23:38 2013-04-12 23:38
source share