|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54563 invalid crt parameters on stream_select
Submitted: 2011-04-18 21:03 UTC Modified: 2017-09-20 16:03 UTC
Avg. Score:4.3 ± 0.9
Reproduced:48 of 48 (100.0%)
Same Version:27 (56.2%)
Same OS:40 (83.3%)
From: alex at phpguide dot co dot il Assigned: cmb (profile)
Status: Closed Package: Streams related
PHP Version: 5.3.6 OS: windows 7
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: alex at phpguide dot co dot il
New email:
PHP Version: OS:


 [2011-04-18 21:03 UTC] alex at phpguide dot co dot il
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:
$errno = null;
$errstr = null;
$timeout = 5;

$stream = stream_socket_client("tcp://", $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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-06-06 14:41 UTC] jinmoku at hotmail dot com
I'have the same issue with this simple code :

$sock = fsockopen('',80);

$e = array($sock);
$w = $r = null;

while(stream_select($r, $w, $e, 0));
 [2011-09-01 15:15 UTC] boen dot robot at gmail dot com
I have the same issue with Windows Server 2008 R2, PHP 5.3.8.
 [2015-06-29 10:57 UTC] miau dot jp at gmail dot com
This problem has been fixed since PHP 5.3.9.
 [2017-09-20 16:03 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2017-09-20 16:03 UTC]
> This problem has been fixed since PHP 5.3.9.

So this ticket can be closed.
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Sep 19 10:01:26 2019 UTC