Edit report at https://bugs.php.net/bug.php?id=60309&edit=1
ID: 60309
Updated by: laruence@php.net
Reported by: Dygear at gmail dot com
Summary: fread(STDIN, 1024) returns instantly.
-Status: Open
+Status: Feedback
Type: Bug
Package: Streams related
Operating System: Windows 7 - CLI
PHP Version: 5.4.0RC1
Block user comment: N
Private report: N
New Comment:
Please try using this snapshot:
http://snaps.php.net/php5.4-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
I can't reproduce this in my environ.
but I do fine that
stream_set_blocking(STDIN, FALSE); Has no effect on windows
Previous Comments:
------------------------------------------------------------------------
[2011-11-15 19:56:45] Dygear at gmail dot com
Description:
------------
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:
---------------
<?php
# 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.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60309&edit=1