W
W
WildZero2013-12-23 12:51:16
PHP
WildZero, 2013-12-23 12:51:16

After updating php to 5.5.6, the script using curl_multi crashed. How to raise it?

Good afternoon.
After updating php to 5.5.6, the script using curl_multi fell.
Even the example from the documentation stopped working:

<?php
// создаем оба ресурса cURL
$ch1 = curl_init();
$ch2 = curl_init();

// устанавливаем URL и другие соответствующие опции
curl_setopt($ch1, CURLOPT_URL, "http://lxr.php.net/");
curl_setopt($ch1, CURLOPT_HEADER, 0);
curl_setopt($ch2, CURLOPT_URL, "http://www.php.net/");
curl_setopt($ch2, CURLOPT_HEADER, 0);

//создаем набор дескрипторов cURL
$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);
    }
}

//закрываем все дескрипторы
curl_multi_remove_handle($mh, $ch1);
curl_multi_remove_handle($mh, $ch2);
curl_multi_close($mh);

?>

Now curl_multi_select() returns -1 all the time.
Has anyone encountered such a problem? Is there a solution?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mikhail Shatilov, 2013-12-23
@iproger

Smoke https://bugs.php.net/bug.php?id=61141

T
tmin10, 2013-12-25
@tmin10

I can only recommend to roll back, this bug can be traced on many new versions, including 5.5.7.
Personally, I will roll back to 5.4.9...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question