|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16081 doesn't seem to honor fopen stdin position in code
Submitted: 2002-03-14 14:51 UTC Modified: 2002-04-15 00:00 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: mlnog at mlong dot org Assigned:
Status: No Feedback Package: Output Control
PHP Version: 4.1.2 OS: tru64 5.0a
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2002-03-14 14:51 UTC] mlnog at mlong dot org
It appears that if I have a fopen to stdin anywhere in my code that PHP will prompt for stdin at the beginning of its execution instead of where I put it in the code.

The following example shows it:

print "BEFORE\n";
print "AFTER\n";

Now as soon as I execute it, it sits and waits for me to enter stdin, then prints

It should be showing BEFORE and then prompt for STDIN, unless there is something major I am missing here.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-14 14:56 UTC]
Maybe it's your terminal buffering?

Have you tried with 'flush();' after your print statements?
 [2002-03-18 12:47 UTC] derek at web-solve dot net
I had the same problem running PHP 4.1.2 under RH 7.2, I downgraded to PHP 4.0.6 and everything was working correctly. The problem seems to be in 4.1.x
 [2002-04-15 00:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jul 19 21:01:28 2024 UTC