#48596 [Opn->Fbk]: stream_filter_remove() example code does not work
| From: | jani@php.net | Date: | Thu, 09 Jul 2009 20:25:11 +0000 |
| Subject: | #48596 [Opn->Fbk]: stream_filter_remove() example code does not work | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-139546@lists.php.net to get a copy of this message | ||
ID: 48596
Updated by: jani@php.net
Reported By: php_nospam at ramihyn dot sytes dot net
-Status: Open
+Status: Feedback
Bug Type: Streams related
Operating System: *
PHP Version: 5.3.0RC3
-Assigned To:
+Assigned To: fb-req-jani
New Comment:
Does this happen with PHP 5.2.10 and 5.2.9 ?
Previous Comments:
------------------------------------------------------------------------
[2009-06-23 19:53:11] php_nospam at ramihyn dot sytes dot net
Had to recompile PHP because i didn't have zlib and bzip2 included, but
now i've also tested the other pieces of code on the Linux VM.
Same result as on the Windows box.
Using filters seems to corrupt the file handle somehow:
After using a compression filter to write to a file, ftell() returns
the same value as before appending the filter, but it is still possible
to write to the file.
After using a decompression filter to read from a file, ftell() returns
the same value as before appending the filter, but every call to fread()
returns an empty string.
In addition, if the script first reads something from the stream, then
a decompression filter is appended for reading and the script tries to
read something, i get the following warning:
Warning: stream_filter_append(): Filter failed to process pre-buffered
data in .../test.php on line 11
Is it, somehow, possible to have the buffers flushed in that case?
------------------------------------------------------------------------
[2009-06-23 18:10:24] php_nospam at ramihyn dot sytes dot net
The example code for stream_filter_remove() doesn't run on my Linux VM
either, which i compiled 5.3.0RC4 on. Same result as on my Windows box:
it correctly writes to the "test.txt" file what it should, but
fpassthru() doesnt output anything.
Doesn't seem to be windows specific.
------------------------------------------------------------------------
[2009-06-23 11:25:57] pajoye@php.net
Is it windows specific?
------------------------------------------------------------------------
[2009-06-21 00:26:42] php_nospam at ramihyn dot sytes dot net
Still doesn't work for me with RC4.
------------------------------------------------------------------------
[2009-06-20 21:57:13] majkl578 at gmail dot com
Sorry, not same, I have 5.3.0RC4
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/48596
--
Edit this bug report at http://bugs.php.net/?id=48596&edit=1