#42020 [Opn]: curl_multi_select causes php to fail, silently
ID: 42020 User updated by: adz999 at yahoo dot co dot uk Reported By: adz999 at yahoo dot co dot uk Status: Open Bug Type: cURL related Operating System: Free BSD (i386) PHP Version: 5.2.3 New Comment: ...and so I can't install the latest version anyway (on the webhost). Previous Comments: [2007-07-18 13:02:23] adz999 at yahoo dot co dot uk Apologies for my ignorance, and noob-ness but I downloaded the cvs snapshot and I have no idea what to do with it!! The bug only occurs on my webhost's server (BSD on i386) and not on my own server (OS X) despite having the same php version. [2007-07-17 19:06:59] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi [2007-07-17 18:58:24] adz999 at yahoo dot co dot uk Some of my submission did not post properly: The "Reproduce code" section should have this at the end: print "4"; The "Expected result" section should continue: ...to loop around again, and therefore print out "2" regardless of whether it then went on to execute curl_multi_exec. -------------------- [2007-07-17 18:47:26] adz999 at yahoo dot co dot uk Description: I am using (a slight variation of) the user-contributed example on this page:http://uk2.php.net/manual/en/function.curl-multi-exec.php. Sometimes it works and sometimes it causes php to fail, without displaying any error notice (error reporting set to E_WARNING). I cannot work out what it is that causes it to fail or not fail, but if I run the same requests on the script multiple times it behaves the same every time. By getting php to print a message between each line of code I have narrowed the problem down to this line: if (curl_multi_select($mh) != -1) This is the php info for the server: http://phpinfo.hostultra.com/ The problem does NOT occur when the script is executed on my local testing server (Mac OS X 10.4.8, PHP 5.2.1). Reproduce code: --- "; while (@ob_end_flush()); while (@flush()); do { $mrc = curl_multi_exec($mh, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM && $active>0 && microtime(1)<$time); print "1"; while (@ob_end_flush()); while (@flush()); while ($active>0 and $mrc == CURLM_OK && microtime(1)<$time){ print "2"; while (@ob_end_flush()); while (@flush()); //this gets printed out fine // wait for network if (curl_multi_select($mh) != -1){ // pull in any new data, or at least handle timeouts do { print "3"; while (@ob_end_flush()); while (@flush()); //php never gets this far $mrc = curl_multi_exec($mh, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM && $active>0 && microtime(1)<$time); } }//end while Expected result: If curl_multi_select($mh) was equal to -1 then I would expect the while loop while ($active>0 and $mrc == CURLM_OK && microtime(1)<$time) Actual result: -- PHP outputs: got as far as executing the curl stuff 1 2 ...and then it stops. The connection to the browser is no longer active. That's it, it just stops there and does no more. No error message. Even if I change the line if (curl_multi_select($mh) != -1) to just if (curl_multi_select($mh)) the result is exactly the same -- Edit this bug report at http://bugs.php.net/?id=42020&edit=1
#42020 [Fbk->Opn]: curl_multi_select causes php to fail, silently
ID: 42020 User updated by: adz999 at yahoo dot co dot uk Reported By: adz999 at yahoo dot co dot uk -Status: Feedback +Status: Open Bug Type: cURL related Operating System: Free BSD (i386) PHP Version: 5.2.3 New Comment: Apologies for my ignorance, and noob-ness but I downloaded the cvs snapshot and I have no idea what to do with it!! The bug only occurs on my webhost's server (BSD on i386) and not on my own server (OS X) despite having the same php version. Previous Comments: [2007-07-17 19:06:59] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi [2007-07-17 18:58:24] adz999 at yahoo dot co dot uk Some of my submission did not post properly: The "Reproduce code" section should have this at the end: print "4"; The "Expected result" section should continue: ...to loop around again, and therefore print out "2" regardless of whether it then went on to execute curl_multi_exec. ---------------- [2007-07-17 18:47:26] adz999 at yahoo dot co dot uk Description: I am using (a slight variation of) the user-contributed example on this page:http://uk2.php.net/manual/en/function.curl-multi-exec.php. Sometimes it works and sometimes it causes php to fail, without displaying any error notice (error reporting set to E_WARNING). I cannot work out what it is that causes it to fail or not fail, but if I run the same requests on the script multiple times it behaves the same every time. By getting php to print a message between each line of code I have narrowed the problem down to this line: if (curl_multi_select($mh) != -1) This is the php info for the server: http://phpinfo.hostultra.com/ The problem does NOT occur when the script is executed on my local testing server (Mac OS X 10.4.8, PHP 5.2.1). Reproduce code: --- "; while (@ob_end_flush()); while (@flush()); do { $mrc = curl_multi_exec($mh, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM && $active>0 && microtime(1)<$time); print "1"; while (@ob_end_flush()); while (@flush()); while ($active>0 and $mrc == CURLM_OK && microtime(1)<$time){ print "2"; while (@ob_end_flush()); while (@flush()); //this gets printed out fine // wait for network if (curl_multi_select($mh) != -1){ // pull in any new data, or at least handle timeouts do { print "3"; while (@ob_end_flush()); while (@flush()); //php never gets this far $mrc = curl_multi_exec($mh, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM && $active>0 && microtime(1)<$time); } }//end while Expected result: If curl_multi_select($mh) was equal to -1 then I would expect the while loop while ($active>0 and $mrc == CURLM_OK && microtime(1)<$time) Actual result: -- PHP outputs: got as far as executing the curl stuff 1 2 ...and then it stops. The connection to the browser is no longer active. That's it, it just stops there and does no more. No error message. Even if I change the line if (curl_multi_select($mh) != -1) to just if (curl_multi_select($mh)) the result is exactly the same -- Edit this bug report at http://bugs.php.net/?id=42020&edit=1
#42020 [Opn]: curl_multi_select causes php to fail, silently
ID: 42020 User updated by: adz999 at yahoo dot co dot uk Reported By: adz999 at yahoo dot co dot uk Status: Open Bug Type: cURL related Operating System: Free BSD (i386) PHP Version: 5.2.3 New Comment: Some of my submission did not post properly: The "Reproduce code" section should have this at the end: print "4"; The "Expected result" section should continue: ...to loop around again, and therefore print out "2" regardless of whether it then went on to execute curl_multi_exec. Previous Comments: -------- [2007-07-17 18:47:26] adz999 at yahoo dot co dot uk Description: I am using (a slight variation of) the user-contributed example on this page:http://uk2.php.net/manual/en/function.curl-multi-exec.php. Sometimes it works and sometimes it causes php to fail, without displaying any error notice (error reporting set to E_WARNING). I cannot work out what it is that causes it to fail or not fail, but if I run the same requests on the script multiple times it behaves the same every time. By getting php to print a message between each line of code I have narrowed the problem down to this line: if (curl_multi_select($mh) != -1) This is the php info for the server: http://phpinfo.hostultra.com/ The problem does NOT occur when the script is executed on my local testing server (Mac OS X 10.4.8, PHP 5.2.1). Reproduce code: --- "; while (@ob_end_flush()); while (@flush()); do { $mrc = curl_multi_exec($mh, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM && $active>0 && microtime(1)<$time); print "1"; while (@ob_end_flush()); while (@flush()); while ($active>0 and $mrc == CURLM_OK && microtime(1)<$time){ print "2"; while (@ob_end_flush()); while (@flush()); //this gets printed out fine // wait for network if (curl_multi_select($mh) != -1){ // pull in any new data, or at least handle timeouts do { print "3"; while (@ob_end_flush()); while (@flush()); //php never gets this far $mrc = curl_multi_exec($mh, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM && $active>0 && microtime(1)<$time); } }//end while Expected result: If curl_multi_select($mh) was equal to -1 then I would expect the while loop while ($active>0 and $mrc == CURLM_OK && microtime(1)<$time) Actual result: -- PHP outputs: got as far as executing the curl stuff 1 2 ...and then it stops. The connection to the browser is no longer active. That's it, it just stops there and does no more. No error message. Even if I change the line if (curl_multi_select($mh) != -1) to just if (curl_multi_select($mh)) the result is exactly the same -- Edit this bug report at http://bugs.php.net/?id=42020&edit=1
#42020 [NEW]: curl_multi_select causes php to fail, silently
From: adz999 at yahoo dot co dot uk Operating system: Free BSD (i386) PHP version: 5.2.3 PHP Bug Type: cURL related Bug description: curl_multi_select causes php to fail, silently Description: I am using (a slight variation of) the user-contributed example on this page:http://uk2.php.net/manual/en/function.curl-multi-exec.php. Sometimes it works and sometimes it causes php to fail, without displaying any error notice (error reporting set to E_WARNING). I cannot work out what it is that causes it to fail or not fail, but if I run the same requests on the script multiple times it behaves the same every time. By getting php to print a message between each line of code I have narrowed the problem down to this line: if (curl_multi_select($mh) != -1) This is the php info for the server: http://phpinfo.hostultra.com/ The problem does NOT occur when the script is executed on my local testing server (Mac OS X 10.4.8, PHP 5.2.1). Reproduce code: --- "; while (@ob_end_flush()); while (@flush()); do { $mrc = curl_multi_exec($mh, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM && $active>0 && microtime(1)<$time); print "1"; while (@ob_end_flush()); while (@flush()); while ($active>0 and $mrc == CURLM_OK && microtime(1)<$time){ print "2"; while (@ob_end_flush()); while (@flush()); //this gets printed out fine // wait for network if (curl_multi_select($mh) != -1){ // pull in any new data, or at least handle timeouts do { print "3"; while (@ob_end_flush()); while (@flush()); //php never gets this far $mrc = curl_multi_exec($mh, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM && $active>0 && microtime(1)<$time); } }//end while Expected result: If curl_multi_select($mh) was equal to -1 then I would expect the while loop while ($active>0 and $mrc == CURLM_OK && microtime(1)<$time) Actual result: -- PHP outputs: got as far as executing the curl stuff 1 2 ...and then it stops. The connection to the browser is no longer active. That's it, it just stops there and does no more. No error message. Even if I change the line if (curl_multi_select($mh) != -1) to just if (curl_multi_select($mh)) the result is exactly the same -- Edit bug report at http://bugs.php.net/?id=42020&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42020&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42020&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42020&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42020&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42020&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42020&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=42020&r=needscript Try newer version:http://bugs.php.net/fix.php?id=42020&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42020&r=support Expected behavior:http://bugs.php.net/fix.php?id=42020&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42020&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42020&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42020&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42020&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42020&r=dst IIS Stability:http://bugs.php.net/fix.php?id=42020&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42020&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42020&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42020&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=42020&r=mysqlcfg