note 115054 added to function.curl-multi-select

From: Date: Tue, 20 May 2014 00:13:05 +0000
Subject: note 115054 added to function.curl-multi-select
Groups: php.notes 
Request: Send a blank email to php-notes+get-199573@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 this always returns -1. This is, apparently, not strictly a bug: according to the libcurl documentation, you should add your own sleep if curl_multi_select returns -1. For example: <?php /* setup $mh */ $active = null; do { $mrc = curl_multi_exec($mh, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM); 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); } /* close $mh */ ?> ---- Server IP: 72.52.91.14 Probable Submitter: 50.120.103.110 ---- Manual Page -- http://php.net/manual/en/function.curl-multi-select.php Edit -- https://master.php.net/note/edit/115054 Del: integrated -- https://master.php.net/note/delete/115054/integrated Del: useless -- https://master.php.net/note/delete/115054/useless Del: bad code -- https://master.php.net/note/delete/115054/bad+code Del: spam -- https://master.php.net/note/delete/115054/spam Del: non-english -- https://master.php.net/note/delete/115054/non-english Del: in docs -- https://master.php.net/note/delete/115054/in+docs Del: other reasons-- https://master.php.net/note/delete/115054 Reject -- https://master.php.net/note/reject/115054 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#199573) next »