ID:               49411
 Comment by:       alex at malexmedia dot net
 Reported By:      alex at malexmedia dot net
 Status:           Assigned
 Bug Type:         Zlib Related
 Operating System: *
 PHP Version:      5.2.11RC2
 Assigned To:      jani
 New Comment:

Let me know when you've got something ready to test, and I'll do so
asap. :)


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

[2009-08-31 20:14:08] [email protected]

The examples don't work because someone (Sara) changed the window 
parameter to default to -15 (to widen the range according to the commit

message) so in the example the deflate uses different params than the 
inflate.

There's also a real bug in this same code. GOTO is truly evil..

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

[2009-08-31 17:36:35] alex at malexmedia dot net

I just built the latest snapshot on Linux and confirmed: this bug is
still present on both Linux and Windows.

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

[2009-08-31 16:55:43] alex at malexmedia dot net

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...

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

[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

Reply via email to