From:             rodricg at sellingsource dot com
Operating system: x86_64 GNU/Linux
PHP version:      5CVS-2007-03-05 (snap)
PHP Bug Type:     Streams related
Bug description:  stream_select returns 0 for php > 5.1.6

Description:
------------
Since php 5.2.0 stream_select fails to return the number of modified
descriptors on a 64bit Linux OS (32bit seems to be immune to this). 
Verified to exist in the php-snap php5.2-200703052130.

This bug is the same as #40458 but I am unable to modify the status of
that bug.

Reproduce code:
---------------
<?php
$sock = stream_socket_client('tcp://maila.microsoft.com:25', $eno, $estr,
10, STREAM_CLIENT_CONNECT);
stream_set_blocking($sock, 0);
sleep(1);

$r = $w = array($sock);
$n = stream_select($r, $w, $e = NULL, 10);

echo "Selected: {$n}\n";
echo "Read: ", print_r($r,1);
echo "Write: ", print_r($w,1);
?>


Expected result:
----------------
Selected: 2
Read: Array
(
    [0] => Resource id #5
)
Write: Array
(
    [0] => Resource id #5
)


Actual result:
--------------
Selected: 0
Read: Array
(
    [0] => Resource id #5
)
Write: Array
(
    [0] => Resource id #5
)


-- 
Edit bug report at http://bugs.php.net/?id=40735&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=40735&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=40735&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=40735&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=40735&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=40735&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=40735&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=40735&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=40735&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=40735&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=40735&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=40735&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=40735&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=40735&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=40735&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=40735&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=40735&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=40735&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=40735&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=40735&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=40735&r=mysqlcfg

Reply via email to