ID: 49411 Updated by: [email protected] Reported By: alex at malexmedia dot net -Status: Open +Status: Feedback Bug Type: Zlib Related Operating System: Linux PHP Version: 5.2.10 New Comment:
Please try using this snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: ------------------------------------------------------------------------ [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
