note 115055 added to function.curl-multi-init
| From: | xxavalanchexx at gmail dot com | Date: | Tue, 20 May 2014 00:17:25 +0000 |
| Subject: | note 115055 added to function.curl-multi-init | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-199574@lists.php.net to get a copy of this message | ||
According to https://bugs.php.net/bug.php?id=61141:
On Windows setups using libcurl version 7.24 or later (which seems to correspond to PHP 5.3.10 or
later), you may find that curl_multi_select() always returns -1, causing the example code in the
documentation to timeout. This is, apparently, not strictly a bug: according to the libcurl
documentation, you should add your own sleep if curl_multi_select returns -1.
Therefore, in order to work correctly on Windows for PHP 5.3.10+, the second loop in the example
code should look something like the following:
<?php
while ($active && $mrc == CURLM_OK) {
if (curl_multi_select($mh) == -1) {
usleep(100);
}
do {
$mrc = curl_multi_exec($mh, $active);
} while ($mrc == CURLM_CALL_MULTI_PERFORM);
}
?>
----
Server IP: 72.52.91.14
Probable Submitter: 50.120.103.110
----
Manual Page -- http://php.net/manual/en/function.curl-multi-init.php
Edit -- https://master.php.net/note/edit/115055
Del: integrated -- https://master.php.net/note/delete/115055/integrated
Del: useless -- https://master.php.net/note/delete/115055/useless
Del: bad code -- https://master.php.net/note/delete/115055/bad+code
Del: spam -- https://master.php.net/note/delete/115055/spam
Del: non-english -- https://master.php.net/note/delete/115055/non-english
Del: in docs -- https://master.php.net/note/delete/115055/in+docs
Del: other reasons-- https://master.php.net/note/delete/115055
Reject -- https://master.php.net/note/reject/115055
Search -- https://master.php.net/manage/user-notes.php