#43637 [Opn->Bgs]: Bug report

From: Date: Sat, 22 Dec 2007 17:14:50 +0000
Subject: #43637 [Opn->Bgs]: Bug report
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-120816@lists.php.net to get a copy of this message
ID: 43637 Updated by: jani@php.net Reported By: sworddragon2 at aol dot com -Status: Open +Status: Bogus Bug Type: Zlib Related Operating System: Windows XP Professional SP2 PHP Version: 5.2.5 New Comment: Open the file in binary mode: $file=fopen("smiley1.gif","rb"); There's no bug here -> bogus. Previous Comments: ------------------------------------------------------------------------ [2007-12-19 12:20:53] 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","r"); $picture=fread($file,filesize("smiley1.gif")); fclose($file); $file=gzopen("smiley1.gz","w"); gzwrite($file,$picture); gzclose($file); //readgzfile("smiley1.gz"); With readgzfile, i get the correct picture information (132 Byte). $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=43637&edit=1

« previous php.bugs (#120816) next »