#42020 [Fbk-Opn]: curl_multi_select causes php to fail, silently

2007-07-18 Thread adz999 at yahoo dot co dot uk
 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 4br;

The Expected result section should continue:
...to loop around again, and therefore print out 2br again.
Or if curl_multi_select($mh) was NOT equal to -1 then I would expect
php to print out 3br 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:
---
?php
$mh = curl_multi_init();
foreach(array_keys($arr_requests) as $i)
curl_multi_add_handle ($mh,$arr_requests[$i]); //each element of
$arr_requests is a curl handle

print got as far as executing the curl stuffbr; while
(@ob_end_flush()); while (@flush());

do  {
$mrc = curl_multi_exec($mh, $active);
} while ($mrc == CURLM_CALL_MULTI_PERFORM  $active0 
microtime(1)$time);


print 1br; while (@ob_end_flush()); while (@flush());

while ($active0 and $mrc == CURLM_OK  microtime(1)$time){
print 2br; 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 3br; while 
(@ob_end_flush()); while (@flush()); //php
never gets this far
$mrc = curl_multi_exec($mh, 
$active);
} while ($mrc == 
CURLM_CALL_MULTI_PERFORM  $active0 
microtime(1)$time);
}
}//end while

Expected result:

If curl_multi_select($mh) was equal to -1 then I would expect the while
loop
while ($active0 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=42020edit=1


#42020 [Opn]: curl_multi_select causes php to fail, silently

2007-07-18 Thread adz999 at yahoo dot co dot uk
 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 4br;

The Expected result section should continue:
...to loop around again, and therefore print out 2br again.
Or if curl_multi_select($mh) was NOT equal to -1 then I would expect
php to print out 3br 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:
---
?php
$mh = curl_multi_init();
foreach(array_keys($arr_requests) as $i)
curl_multi_add_handle ($mh,$arr_requests[$i]); //each element of
$arr_requests is a curl handle

print got as far as executing the curl stuffbr; while
(@ob_end_flush()); while (@flush());

do  {
$mrc = curl_multi_exec($mh, $active);
} while ($mrc == CURLM_CALL_MULTI_PERFORM  $active0 
microtime(1)$time);


print 1br; while (@ob_end_flush()); while (@flush());

while ($active0 and $mrc == CURLM_OK  microtime(1)$time){
print 2br; 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 3br; while 
(@ob_end_flush()); while (@flush()); //php
never gets this far
$mrc = curl_multi_exec($mh, 
$active);
} while ($mrc == 
CURLM_CALL_MULTI_PERFORM  $active0 
microtime(1)$time);
}
}//end while

Expected result:

If curl_multi_select($mh) was equal to -1 then I would expect the while
loop
while ($active0 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=42020edit=1


#42020 [NEW]: curl_multi_select causes php to fail, silently

2007-07-17 Thread adz999 at yahoo dot co dot uk
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:
---
?php
$mh = curl_multi_init();
foreach(array_keys($arr_requests) as $i)
curl_multi_add_handle ($mh,$arr_requests[$i]); //each element of
$arr_requests is a curl handle

print got as far as executing the curl stuffbr; while
(@ob_end_flush()); while (@flush());

do  {
$mrc = curl_multi_exec($mh, $active);
} while ($mrc == CURLM_CALL_MULTI_PERFORM  $active0 
microtime(1)$time);


print 1br; while (@ob_end_flush()); while (@flush());

while ($active0 and $mrc == CURLM_OK  microtime(1)$time){
print 2br; 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 3br; while 
(@ob_end_flush()); while (@flush()); //php
never gets this far
$mrc = curl_multi_exec($mh, 
$active);
} while ($mrc == 
CURLM_CALL_MULTI_PERFORM  $active0 
microtime(1)$time);
}
}//end while

Expected result:

If curl_multi_select($mh) was equal to -1 then I would expect the while
loop
while ($active0 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=42020edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=42020r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=42020r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=42020r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=42020r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=42020r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=42020r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=42020r=needscript
Try newer version:http://bugs.php.net/fix.php?id=42020r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=42020r=support
Expected behavior:http://bugs.php.net/fix.php?id=42020r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=42020r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=42020r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=42020r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=42020r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=42020r=dst
IIS Stability:http://bugs.php.net/fix.php?id=42020r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=42020r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=42020r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=42020r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=42020r=mysqlcfg


#42020 [Opn]: curl_multi_select causes php to fail, silently

2007-07-17 Thread adz999 at yahoo dot co dot uk
 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 4br;

The Expected result section should continue:
...to loop around again, and therefore print out 2br again.
Or if curl_multi_select($mh) was NOT equal to -1 then I would expect
php to print out 3br 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:
---
?php
$mh = curl_multi_init();
foreach(array_keys($arr_requests) as $i)
curl_multi_add_handle ($mh,$arr_requests[$i]); //each element of
$arr_requests is a curl handle

print got as far as executing the curl stuffbr; while
(@ob_end_flush()); while (@flush());

do  {
$mrc = curl_multi_exec($mh, $active);
} while ($mrc == CURLM_CALL_MULTI_PERFORM  $active0 
microtime(1)$time);


print 1br; while (@ob_end_flush()); while (@flush());

while ($active0 and $mrc == CURLM_OK  microtime(1)$time){
print 2br; 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 3br; while 
(@ob_end_flush()); while (@flush()); //php
never gets this far
$mrc = curl_multi_exec($mh, 
$active);
} while ($mrc == 
CURLM_CALL_MULTI_PERFORM  $active0 
microtime(1)$time);
}
}//end while

Expected result:

If curl_multi_select($mh) was equal to -1 then I would expect the while
loop
while ($active0 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=42020edit=1