ID: 40735
User updated by: rodricg at sellingsource dot com
Reported By: rodricg at sellingsource dot com
-Status: Feedback
+Status: Open
Bug Type: Streams related
Operating System: x86_64 GNU/Linux
PHP Version: 5CVS-2007-03-05 (snap)
New Comment:
What information can I provide to help determine the cause of this
problem on my system? Thanks!
Previous Comments:
------------------------------------------------------------------------
[2007-03-05 22:47:35] [EMAIL PROTECTED]
Tested on Linux/Intel 64, Linux/AMD 64, Linux/PPC 64 & Solaris/SPARC
64. In all cases I get:
Selected: 2
Read: Array
(
[0] => Resource id #5
)
Write: Array
(
[0] => Resource id #5
)
------------------------------------------------------------------------
[2007-03-05 22:39:19] rodricg at sellingsource dot com
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 this bug report at http://bugs.php.net/?id=40735&edit=1