Bug #17258 Updated: command line stdin order not honored
| From: | edink@php.net | Date: | Thu, 16 May 2002 00:39:54 +0000 |
| Subject: | Bug #17258 Updated: command line stdin order not honored | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-7807@lists.php.net to get a copy of this message | ||
ID: 17258
Updated by: edink@php.net
Reported By: mlong@mlong.org
-Status: Feedback
+Status: Closed
Bug Type: Scripting Engine problem
Operating System: Compaq Tru64 5.1
PHP Version: 4.2.1
Previous Comments:
------------------------------------------------------------------------
[2002-05-15 20:29:55] mlong@mlong.org
Yep that was it...when I turned output buffering off the problem went
away. Still strange behavior though...I would think asking for input
should automatically flush any pending output
------------------------------------------------------------------------
[2002-05-15 18:44:43] edink@php.net
What are settings for implicit_flush and output_buffering in your
php.ini? Try setting them to:
implicit_flush = On
output_buffering = Off
------------------------------------------------------------------------
[2002-05-15 14:58:29] mlong@mlong.org
I guess it must be an issue with how php interacts with tru64
------------------------------------------------------------------------
[2002-05-15 14:34:54] sander@php.net
Works fine for me on linux, this may be problem with terminal...
------------------------------------------------------------------------
[2002-05-15 14:30:49] mlong@mlong.org
Consider this simple script:
#!/usr/local/bin/php -q
<?
echo "TEST\n";
$fd=fopen("php://stdin","r");
$test=fgets($fd,4096);
?>
When I run it PHP immediately asks for stdin, then after I enter
something it does the echo "TEST". It's ignoring the order of my code!
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17258&edit=1