ID:               21043
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Feedback
 Bug Type:         Filesystem function related
 Operating System: Solaris 7
 PHP Version:      4.2.3
 New Comment:

and make sure you're really using the CLI binary..



Previous Comments:
------------------------------------------------------------------------

[2002-12-16 06:19:29] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip

------------------------------------------------------------------------

[2002-12-16 06:13:29] [EMAIL PROTECTED]

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 this bug report at http://bugs.php.net/?id=21043&edit=1

Reply via email to