Edit report at https://bugs.php.net/bug.php?id=61141&edit=1
ID: 61141
Comment by: amoo_miki at yahoo dot com
Reported by: amoo_miki at yahoo dot com
Summary: curl_multi_exec functionality broken
Status: Feedback
Type: Bug
Package: cURL related
Operating System: Windows 7 x64
PHP Version: 5.3.10
Block user comment: N
Private report: N
New Comment:
I used these URLs just to make sure the content is small while my original code looks at various
news feeds. I did make sure the URLs return stuff, via simple usage of cURL too.
The timeout happens within the loop that performs the curl_multi_select.
Previous Comments:
------------------------------------------------------------------------
[2012-02-20 10:46:59] rasmus@php.net
There were no code changes between 5.3.9 and 5.3.10 that could possibly have
caused this. I notice you are using php.net sites in your test script. We had
some dns problems around the time you reported this. Are you sure this wasn't
related to that?
------------------------------------------------------------------------
[2012-02-20 10:24:15] amoo_miki at yahoo dot com
Description:
------------
Trying to run multiple curl calls, fails with a timeout while checking for activity.
PHP 5.3.9 and before work just fine.
Test script:
---------------
<?php //Taken from
$ch1 = curl_init();
$ch2 = curl_init();
curl_setopt($ch1, CURLOPT_URL, "http://windows.php.net/downloads/releases/md5sum.txt");
curl_setopt($ch1, CURLOPT_HEADER, 0);
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch2, CURLOPT_URL, "http://windows.php.net/downloads/releases/sha1sum.txt");
curl_setopt($ch2, CURLOPT_HEADER, 0);
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, 1);
$mh = curl_multi_init();
curl_multi_add_handle($mh,$ch1);
curl_multi_add_handle($mh,$ch2);
$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) do { $mrc =
curl_multi_exec($mh, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM);
echo strlen(curl_multi_getcontent($ch1))."-".strlen(curl_multi_getcontent($ch2));
curl_multi_remove_handle($mh, $ch1);
curl_multi_remove_handle($mh, $ch2);
curl_multi_close($mh);
?>
Expected result:
----------------
Seen on PHP 5.3.9:
531-1375
Actual result:
--------------
Seen on PHP 5.3.10:
Fatal error: Maximum execution time of 30 seconds exceeded in <filepath> on line 15
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61141&edit=1