|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-05-02 16:31 UTC] 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
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 13:00:01 2025 UTC |
I tested it with the 5.2.7RC2-dev and the 5.3.0alpha3-dev from your link, but the bug isn't fixed. In both versions, Firefox 3.0.3 gives me an output of: Array ( [0] => GIF89a ) It breaks again after the End Transmission Block. I used the same picture again.$file=gzopen("smiley1.gz","w"); I think that should also be "wb" under windows..