PHP 4.0 Bug #7033: gzcompress does not work as expected

From: Date: Thu, 05 Oct 2000 08:24:02 +0000
Subject: PHP 4.0 Bug #7033: gzcompress does not work as expected
Groups: php.dev 
Request: Send a blank email to php-dev+get-34259@lists.php.net to get a copy of this message
From: mg@plum.de Operating system: Linux, rh6.2 2.4.0-test6 PHP version: 4.0.2 PHP Bug Type: *Zlib related Bug description: gzcompress does not work as expected $gzip = gzcompress($h->inhalt); header("Content-Encoding: gzip"); print($gzip); $fp = fopen("/tmp/file.gz","w"); fputs($fp,$gzip); fclose($fp); does not work, the browser does not display anything, and gzip -d /tmp/file.gz tells me that the file is not a valid gzip file. If I do: $fp = gzopen ("/tmp/file.gz", "w"); gzputs($fp,$h->inhalt); gzclose($fp); and then gzip -d again, everything works. The file generated by gzcompress is about 20 Bytes shorter than the one from gzopen, so I suspect there is probably some problem with NULL-Termination... TIA, Michael

« previous php.dev (#34259) next »