|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
  [2011-04-18 21:03 UTC] alex at phpguide dot co dot il
 Description:
------------
Apparently there are some errors selecting streams on windows platforms
when calling some native win functions.
linux wouldnt reproduce
5.3.6 vc9
Test script:
---------------
<?PHP
$errno = null;
$errstr = null;
$timeout = 5;
$conflag = STREAM_CLIENT_CONNECT;
$stream = stream_socket_client("tcp://jabber.org:5222", $errno, $errstr, $timeout, $conflag);
var_dump($stream); echo $errno, $errstr;
$r = array($stream);
$w = array(fopen('fakestream.txt', 'r')); // both file exist
$e = array(fopen('fakestream.txt2', 'r'));
$enull = $wnull = array();
// execute seperately
//$update = stream_select ( $r , $wnull, $enull , 5, 0 ); 
$update2 = stream_select( $r , $w, $e, 5, 0 );
Expected result:
----------------
no errors
Actual result:
--------------
Warning: Invalid CRT parameters detected in crtwtf.php on line 17/18
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 07:00:01 2025 UTC | 
I'have the same issue with this simple code : $sock = fsockopen('127.0.0.1',80); $e = array($sock); $w = $r = null; while(stream_select($r, $w, $e, 0));