php.net |  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
Votes:50
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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
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
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



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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('127.0.0.1',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.
https://github.com/php/php-src/commit/fb53dd80d841e8465aba29ac057172e659369112
 [2017-09-20 16:03 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2017-09-20 16:03 UTC] cmb@php.net
> This problem has been fixed since PHP 5.3.9.
> https://github.com/php/php-src/commit/fb53dd80d841e8465aba29ac057172e659369112

So this ticket can be closed.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 19:01:29 2024 UTC