From: ryan at ryanmills dot net Operating system: Vista X64 PHP version: 5.2.10 PHP Bug Type: Streams related Bug description: cant make STDIN non blocking
Description: ------------ I have read a number of past bug reports from 2002 to just a month or two ago. Under windows it does not seem that you can make STDIN non blocking. Follow code from: http://bugs.php.net/bug.php?id=47893&edit=2 Tested on 5.2.9-2 and 5.2.10 Notes say it was fixed in CVS so I assume 5.2.10 would have had the fix. *NOTE php.ini changes ;;;;;;;;;;;;;;;;;;; ; Resource Limits ; ;;;;;;;;;;;;;;;;;;; max_execution_time = 0 ; Maximum execution time of each script, in seconds max_input_time = 0 ; Maximum amount of time each script may spend parsing request data ;max_input_nesting_level = 64 ; Maximum input variable nesting level memory_limit = 512M ; Maximum amount of memory a script may consume (128MB) Reproduce code: --------------- <?php stream_set_blocking(STDIN, FALSE); while (1) { var_dump(fread(STDIN,1)); echo "\n";; } ?> Expected result: ---------------- A never-ending sequence of var_dumps of either an empty string or a typed character Actual result: -------------- stuck waiting for the user to press enter. -- Edit bug report at http://bugs.php.net/?id=48684&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48684&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48684&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48684&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48684&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48684&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48684&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48684&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48684&r=needscript Try newer version: http://bugs.php.net/fix.php?id=48684&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48684&r=support Expected behavior: http://bugs.php.net/fix.php?id=48684&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48684&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48684&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48684&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48684&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=48684&r=dst IIS Stability: http://bugs.php.net/fix.php?id=48684&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48684&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48684&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48684&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48684&r=mysqlcfg