#22538 [NEW]: stream filters & stream_copy_to_stream combo produces bogus output

From: Date: Tue, 04 Mar 2003 18:49:03 +0000
Subject: #22538 [NEW]: stream filters & stream_copy_to_stream combo produces bogus output
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-34797@lists.php.net to get a copy of this message
From: moriyoshi@php.net Operating system: RedHat Linux 8.0 (glibc-2.3.0) PHP version: 5CVS-2003-03-04 (dev) PHP Bug Type: Filesystem function related Bug description: stream filters & stream_copy_to_stream combo produces bogus output $ cat Zend/zend.c | php script2.php produces bogus output, whilst $ php script1.php and $ php script3.php work correctly. script1.php: <?php $fin = fopen("Zend/zend.c", "r"); $fout = fopen("/tmp/output", "w"); stream_filter_append($fout, "string.rot13"); stream_copy_to_stream($fin, $fout); fclose($fin); fclose($fout); ?> script2.php: <?php $fin = fopen("php://stdin", "r"); $fout = fopen("/tmp/output", "w"); stream_filter_append($fout, "string.rot13"); stream_copy_to_stream($fin, $fout); fclose($fin); fclose($fout); ?> script3.php: <?php $fin = fopen("php://stdin", "r"); $fout = fopen("/tmp/output", "w"); stream_filter_append($fin, "string.rot13"); stream_copy_to_stream($fin, $fout); fclose($fin); fclose($fout); ?> -- Edit bug report at http://bugs.php.net/?id=22538&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=22538&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=22538&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=22538&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=22538&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=22538&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=22538&r=support Expected behavior: http://bugs.php.net/fix.php?id=22538&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=22538&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=22538&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=22538&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22538&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=22538&r=dst IIS Stability: http://bugs.php.net/fix.php?id=22538&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=22538&r=gnused

« previous php.bugs (#34797) next »