php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #53331 curl_setopt timeout
Submitted: 2010-11-17 14:40 UTC Modified: 2011-02-10 16:24 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: hagaeru3sei at yahoo dot co dot jp Assigned: kalle (profile)
Status: Closed Package: cURL related
PHP Version: 5.3.3 OS: Linux
Private report: No CVE-ID: None
 [2010-11-17 14:40 UTC] hagaeru3sei at yahoo dot co dot jp
Description:
------------
---
From manual page: http://www.php.net/function.curl-setopt#パラメータ
---

I think that it does not work "CURLOPT_CONNECTTIMEOUT_MS and CURLOPT_TIMEOUT_MS" when I set less than 1000 digit.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-11-17 15:34 UTC] kalle@php.net
-Status: Open +Status: Feedback
 [2010-11-17 15:34 UTC] kalle@php.net
You think? Please make sure before you submit a bug report and set this status to "Open" if confirmed
 [2010-11-18 09:15 UTC] hagaeru3sei at yahoo dot co dot jp
-Status: Feedback +Status: Open
 [2010-11-18 09:15 UTC] hagaeru3sei at yahoo dot co dot jp
Sorry, it was not "think", but I checked it.

-- example
-- true case
curl = curl_easy_init();
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/");
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT_MS, 1000);
res = curl_easy_perform(curl);

res == CURLE_OK


-- false case
curl = curl_easy_init();
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/");
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT_MS, 999);
res = curl_easy_perform(curl);

res != CURLE_OK

and curl_error message is "Timeout was reached"


This is the specification of cURL? if it is truth, we must confirm it and PHP documentation.
 [2010-11-18 10:35 UTC] Kalle@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: kalle
 [2010-11-18 10:35 UTC] Kalle@php.net
Thanks, I'll assign this to myself and will update the relevant documentation accordingly
 [2010-11-18 10:35 UTC] Kalle@php.net
Thanks, I'll assign this to myself and will update the relevant documentation accordingly
 [2011-02-10 16:24 UTC] vrana@php.net
Automatic comment from SVN on behalf of vrana
Revision: http://svn.php.net/viewvc/?view=revision&revision=308205
Log: Clarify TIMEOUT_MS (doc bug #53331)
 [2011-02-10 16:24 UTC] vrana@php.net
-Status: Assigned +Status: Closed
 [2011-02-10 16:24 UTC] vrana@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

"If libcurl is built to use the standard system name resolver, that portion of the connect will still use full-second resolution for timeouts with a minimum timeout allowed of one second."
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 23 20:01:30 2024 UTC