ID:               26332
 Updated by:       [EMAIL PROTECTED]
 Reported By:      foxkill at gmx dot de
-Status:           Open
+Status:           Feedback
 Bug Type:         cURL related
 Operating System: Linux
 PHP Version:      5CVS-2003-11-20 (dev)
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try avoid embedding huge scripts into the report.




Previous Comments:
------------------------------------------------------------------------

[2003-11-20 09:48:05] foxkill at gmx dot de

Description:
------------
I try to use curl_multi_fdset() together with curl_multi_exec() in
php5. But this doesn't work.

I modelled my php code after the sample (multi-app.c) which is provided
by the curl-src package.

Reproduce code:
---------------
this is the code I use for php5 (three single curl handles were
added):



while (CURLM_CALL_MULTI_PERFORM == curl_multi_exec($m, $still_running))


  ;



while ($still_running) {

     $fd = curl_multi_select($m, 1);



     switch($fd) {

        case -1:

        break;



        case 0:

        default:

        while (CURLM_CALL_MULTI_PERFORM == curl_multi_exec($m,
$still_running))

          ;

    }

}

Expected result:
----------------
The code should behave like the multi-app.c sample. See
[curl-src]/docs/examples/multi-app.c.

Actual result:
--------------
The code runs in an endless loop. Because curl_multi_exec() (alias
curl_multi_perform()) needs to reference the variables readfds,
writefds which were set by a previous call to curl_multi_fdset(). But
these fdsets have gone out of scope. The C Code works because the
fdsets are still present on the stack. See man 3 curl_multi_fdset for
further details. curl --version gives:



curl 7.10.8 (i686-pc-linux-gnu) libcurl/7.10.8 OpenSSL/0.9.7c
zlib/1.1.4

Protocols: ftp gopher ldap http file https ftps

Features: SSL libz NTLM




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=26332&edit=1

Reply via email to