ID: 44893
Updated by: kalle@php.net
Reported By: sworddragon2 at aol dot com
-Status: Open
+Status: Verified
Bug Type: Zlib Related
Operating System: Windows XP Professional SP3
PHP Version: 5.2.6
New Comment:
Im able to re-produce this on Windows XP SP2 using the image you
supplied aswell as with other files would return odd strings
Previous Comments:
------------------------------------------------------------------------
[2008-05-02 21:19:38] sworddragon2 at aol dot com
I used this picture for the example:
http://img501.imageshack.us/img501/7006/smiley1dr6.gif
Maybe it helps you to reproduce the problem. But this was not the only
picture with that I can reproduce the problem.
------------------------------------------------------------------------
[2008-05-02 20:49:26] fa@php.net
Couldn't reproduce on Win XP SP2 with php-5.2.6-Win32.zip
------------------------------------------------------------------------
[2008-05-02 16:31:23] sworddragon2 at aol dot com
Description:
------------
If im trying to use the function gzfile() to a compressed file, that
includes just a picture, the function don't read the complete file. On
this reproduce, the function stops after the End Transmission Block.
Reproduce code:
---------------
$file=fopen("smiley1.gif","rb");
$picture=fread($file,filesize("smiley1.gif"));
fclose($file);
$file=gzopen("smiley1.gz","w");
gzwrite($file,$picture);
gzclose($file);
$file=gzfile("smiley1.gz");
print_r($file);
Expected result:
----------------
I expect to see all arrays until the end of the file.
Actual result:
--------------
With gzfile, i got just the array [0] with the content GIF89a
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44893&edit=1