#49411 [Fbk->Opn]: zlib.inflate Stream Filter Broken
ID: 49411
User updated by: alex at malexmedia dot net
Reported By: alex at malexmedia dot net
-Status: Feedback
+Status: Open
Bug Type: Zlib Related
-Operating System: Linux
+Operating System: Linux & Windows
PHP Version: 5.2.10
New Comment:
Just tried the binary windows snapshot (5.2.11RC2-dev) and the problem
still appears to be happening.
I'll build the latest snapshot on Linux and try there too...
Previous Comments:
------------------------------------------------------------------------
[2009-08-30 01:25:25] jani@php.net
Please try using this snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
------------------------------------------------------------------------
[2009-08-29 21:53:56] alex at malexmedia dot net
Description:
------------
The ZLib "inflate" stream filter appears to be broken in PHP 5.2.9 and
5.2.10. When trying to inflate a GZip file, or even a stream previously
compressed with zlib.deflate, zlib.inflate returns no output.
Reproduce code:
---------------
<?php
//zlibtest.php
//Usage:
// $ echo TEST TEST TEST | gzip | php zlibtest.php
$input = fopen("php://stdin", "rb");
stream_filter_append($input, 'zlib.inflate', STREAM_FILTER_READ);
while(!feof($input) && ($buffer = fread($input, 8192)) !== FALSE)
fwrite(STDOUT, $buffer);
fclose($input);
//Inexplicably, this will produce no output on STDOUT.
//Even the example at http://us3.php.net/filters.compression behaves
incorrectly.
?>
Expected result:
----------------
I expect to see "TEST TEST TEST" on the command line.
Actual result:
--------------
The zlib.inflate filter is clearly not producing decompressed results
on fread() operations. By my reckoning, this is a problem.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=49411&edit=1
Thread (8 messages)