Edit report at https://bugs.php.net/bug.php?id=60309&edit=1
ID: 60309 Updated by: larue...@php.net Reported by: Dygear at gmail dot com Summary: fread(STDIN, 1024) returns instantly. -Status: Feedback +Status: Closed Type: Bug Package: Streams related Operating System: Windows 7 - CLI PHP Version: 5.4.0RC1 -Assigned To: +Assigned To: laruence Block user comment: N Private report: N New Comment: I this this could be closed now Previous Comments: ------------------------------------------------------------------------ [2011-11-17 15:27:25] paj...@php.net next should work again. ------------------------------------------------------------------------ [2011-11-17 13:27:43] Dygear at gmail dot com Never mind, I now realize that the link was at the bottom. So I downloaded http://windows.php.net/downloads/snaps/php-trunk/r319151/php-trunk-nts-windows- vc9-x86-r319151.zip and now it works! Great job if that build includes your fix! ------------------------------------------------------------------------ [2011-11-17 13:19:35] Dygear at gmail dot com It seem that the snapshot was never compiled for the windows side, all 5.4 branch downloads on the http://windows.php.net/snapshots/ are 0 Bytes, and just redirect in a loop. ------------------------------------------------------------------------ [2011-11-16 07:41:20] larue...@php.net 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 ------------------------------------------------------------------------ [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