From: [EMAIL PROTECTED]
Operating system: Solaris 7
PHP version: 4.2.3
PHP Bug Type: Filesystem function related
Bug description: stdin/pipe reportedly fixed
In bug report 18022 you said that you have fixed the bug that only lets php
read the first line from stdin when used in a pipe. I am still finding
this bug.
The code i use is:
#!/usr/local/bin/php -q
<?PHP
$fp = fopen("php://stdin", "r");
$username = $argv[1];
$mail = "";
while (!feof($fp))
{
$mail = $mail.fgets($fp, 4096);
}
print($mail);
fclose($fp);
?>
This only prints the first line of any file I pipe to it using cat.
PHP was compiled with:
'--with-pgsql' '--enable-cli' '--enable-ftp' '--enable-sockets'.
--
Edit bug report at http://bugs.php.net/?id=21043&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21043&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=21043&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=21043&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21043&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=21043&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=21043&r=support
Expected behavior: http://bugs.php.net/fix.php?id=21043&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=21043&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=21043&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=21043&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21043&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=21043&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=21043&r=isapi