|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60309 fread(STDIN, 1024) returns instantly.
Submitted: 2011-11-15 19:56 UTC Modified: 2011-11-18 02:29 UTC
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: Dygear at gmail dot com Assigned: laruence (profile)
Status: Closed Package: Streams related
PHP Version: 5.4.0RC1 OS: Windows 7 - CLI
Private report: No CVE-ID: None
 [2011-11-15 19:56 UTC] Dygear at gmail dot com
I am using the windows version of PHP 5.4 (5.4.0RC1) from 2011-Nov-10 19:52:12, 
VC9 x86 Non Thread Safe. In 5.3.x the code worked to where I could query a client 
for an input from the command line using fread and STDIN. In the version stated, 
5.4.0RC1, the function returns right away, and does not give the user anytime to 
input a string.

Test script:

	# stream_set_blocking(STDIN, TRUE); // Has no effect.

	echo fread(STDIN, 1024);


Expected result:
I would expect for there be an opportunity for the user to input a string.

Actual result:
The script has no result, and the client is never queried for a string.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-11-16 07:41 UTC]
Please try using this snapshot:
For Windows:

I can't reproduce this in my environ. 
but I do fine that 
stream_set_blocking(STDIN, FALSE);  Has no effect on windows
 [2011-11-16 07:41 UTC]
-Status: Open +Status: Feedback
 [2011-11-17 13:19 UTC] Dygear at gmail dot com
It seem that the snapshot was never compiled for the windows side, all 5.4 branch 
downloads on the are 0 Bytes, and just redirect 
in a loop.
 [2011-11-17 13:27 UTC] Dygear at gmail dot com
Never mind, I now realize that the link was at the bottom. So I downloaded and now it works! Great job if that build includes your fix!
 [2011-11-17 15:27 UTC]
next should work again.
 [2011-11-18 02:29 UTC]
I this this could be closed now
 [2011-11-18 02:29 UTC]
-Status: Feedback +Status: Closed -Assigned To: +Assigned To: laruence
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 14 21:01:27 2024 UTC