php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #64443 "CURLM_CALL_MULTI_PERFORM is deprecated and will never be returned"
Submitted: 2013-03-17 18:53 UTC Modified: 2014-04-25 12:09 UTC
Votes:11
Avg. Score:4.6 ± 0.5
Reproduced:8 of 8 (100.0%)
Same Version:7 (87.5%)
Same OS:2 (25.0%)
From: alhabshi3k at gmail dot com Assigned:
Status: Duplicate Package: cURL related
PHP Version: 5.4.13 OS: windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: alhabshi3k at gmail dot com
New email:
PHP Version: OS:

 

 [2013-03-17 18:53 UTC] alhabshi3k at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.curl-multi-exec#refsect1-function.curl-multi-exec-examples
---
In: Example #1 curl_multi_exec() , executing curl_multi_exec and processing url channels handles based on CURLM_CALL_MULTI_PERFORM defined constant will no be valid. This is due the development in libCurl that is decided by its team. this is issue is found in LibCurl version 7.20.0 and above, where "CURLM_CALL_MULTI_PERFORM is deprecated and will never be returned,as documented" (1)

The PHP 5.4.12 extension of curl is based on  LibCurl 7.27.0. 

Therefore, the example runs until timeout.with out a valid result. 

Reference :
(1) http://comments.gmane.org/gmane.comp.web.curl.library/36537


Test script:
---------------
//execute the handles (scrap from Example #1 curl_multi_exec ) where the problem.

do {
    $mrc = curl_multi_exec($mh, $active);
} while ($mrc == CURLM_CALL_MULTI_PERFORM);

while ($active && $mrc == CURLM_OK) {
    if (curl_multi_select($mh) != -1) {
        do {
            $mrc = curl_multi_exec($mh, $active);
        } while ($mrc == CURLM_CALL_MULTI_PERFORM);
    }
}
//--------------------------------------
/*  The old code example work like charm , as in these cases
do {    curl_multi_exec($mh,$active);  }  while ($active > 0);
*/

Expected result:
----------------
- output of urls resource contents.
- $mrc variable should rotate values of active running handle count.
- CURLM_CALL_MULTI_PERFORM should count of actual handles in the stack,if it is valid.

Actual result:
--------------
timeout... :(

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-04-25 12:09 UTC] mike@php.net
-Status: Open +Status: Duplicate
 [2014-04-25 12:09 UTC] mike@php.net
Duplicate of bug #60652
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon May 20 16:01:26 2019 UTC