#21043 [Opn->Fbk]: stdin/pipe reportedly fixed

From: Date: Mon, 16 Dec 2002 12:19:29 +0000
Subject: #21043 [Opn->Fbk]: stdin/pipe reportedly fixed
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-27847@lists.php.net to get a copy of this message
ID: 21043 Updated by: derick@php.net Reported By: agdr@dcs.st-and.ac.uk -Status: Open +Status: Feedback Bug Type: Filesystem function related Operating System: Solaris 7 PHP Version: 4.2.3 New Comment: 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 Previous Comments: ------------------------------------------------------------------------ [2002-12-16 06:13:29] agdr@dcs.st-and.ac.uk 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

« previous php.bugs (#27847) next »