From: roberto at spadim dot com dot br
Operating system: linux 64bits
PHP version: 5.2.1
PHP Bug Type: *General Issues
Bug description: stream_select
Description:
------------
hello i was using archlinux 32 bits version on pentium3
i bought an intel core 2 duo e6600 and i'm using archlinux 64
my code on 32 bits was using
$read = array($stream);
if (false === ($num_changed_streams = stream_select($read, $write = NULL,
$except = NULL, 1,0))){
on 32 bits ok, it wait one second or if data received return with
num_changed_stream>0
on 64 bits no, it return imediatly and num_changed_stream=0, since tcpdump
didn't show nothing i think that's an 64bits bug
i created $stream with:
$stream = stream_socket_client("tcp://172.16.0.1:515", $this->errNo,
$this->errStr, $this->timeout);
stream_set_write_buffer($stream,0);
stream_set_blocking($stream,1);
stream_set_timeout($stream,2,0);
Reproduce code:
---------------
<?
$stream = stream_socket_client("tcp://172.16.0.1:515", $this->errNo,
$this->errStr, $this->timeout);
stream_set_write_buffer($stream,0);
stream_set_blocking($stream,1);
stream_set_timeout($stream,2,0);
$read = array($stream);
echo microtime(0)."\n";
$num_changed_streams = stream_select($read, $write = NULL, $except = NULL,
1,0);
echo microtime(0)."\n";
?>
Expected result:
----------------
a long time (1 second of diff)
Actual result:
--------------
on 32bits php ok
on 64 bits php return .0010 seconds of diff and tcpdump didn't showed
nothing on this stream
--
Edit bug report at http://bugs.php.net/?id=40458&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=40458&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=40458&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=40458&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40458&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=40458&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40458&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40458&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40458&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40458&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40458&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=40458&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=40458&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40458&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40458&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40458&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40458&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40458&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40458&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40458&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40458&r=mysqlcfg