Hi all,

I've run into a peculiar situation where the inflate implementation in
the zlib.inflate filter fails to successfully inflate a gzipped file
created using gzopen/gzwrite.  The file is really quite simple.  To
replicate, download http://pear.php.net/get/PEAR-1.6.1.tgz and run this
script:

<?php
$fp = fopen('PEAR-1.6.1.tgz', 'rb');
stream_filter_append($fp, 'zlib.inflate');
var_dump(fread($fp, 2000), feof($fp));
fclose($fp);
?>

output is:

string(0) ""
bool(false)

The results are the same when using file_get_contents(), readfile(), and
also with the zlib.inflate example in the PHP manual.  This is on a
64-bit system with PHP 5.2.4 CVS HEAD, although the zlib.inflate
implementation hasn't changed substantially since 2005 (and yes, I also
tested it without the 3-line patch introduced in PHP 5.2.1 to see if it
was the cause).

Can anyone else confirm the above behavior?

Thanks,
Greg

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to