ID:               48596
 Comment by:       php_nospam at ramihyn dot sytes dot net
 Reported By:      php_nospam at ramihyn dot sytes dot net
 Status:           Open
 Bug Type:         Streams related
 Operating System: *
 PHP Version:      5.3.0RC3
 New Comment:

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?


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

[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] [email protected]

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

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

[2009-06-20 21:56:24] majkl578 at gmail dot com

Same problem as in first post here (code tested).
OS: Debian Lenny (unstable)
Same PHP version.

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

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

Reply via email to