From:             atz at atz dot msk dot ru
Operating system: FreeBSD 5.0-RELEASE
PHP version:      4CVS-2003-03-30 (stable)
PHP Bug Type:     Zlib Related
Bug description:  "gzuncompress data error" while trying to uncompress TRUE gzip data

I'am trying to fetch data with fsockopen and etc.
from URL
http://suncity.combats.ru/inf.pl?login=atz
OR
http://capitalcity.combats.ru/inf.pl?login=atz

And as result in variable named $Data i have a compressed
gzip data from that url with "Content-encoding: gzip".

But! When i try to 
gzuncompress($Data) 
the php returns
Warning: gzuncompress(): data error 

gzinflate($Data)
Warning: gzinflate(): data error 

I'm try to do following:

$fp = fopen("gzipped","w");
fwrite($fp, $Data, strlen($Data));
fclose($fp);

$buffer = "";
$gzfp = gzopen("gzipped","r");
while (!gzeof($gzfp)) {
 $buffer .= gzread($gzfp, 1024);
}
gzclose($gzfp);

And as result i have normal UNCOMPRESSED data 
in varaiable named $buffer.

Why gzuncompress do not uncompress $Data while
gzopen do this success?

Is this a bug?

-- 
Edit bug report at http://bugs.php.net/?id=22967&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=22967&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=22967&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=22967&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=22967&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=22967&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=22967&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=22967&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=22967&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=22967&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=22967&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22967&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=22967&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=22967&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=22967&r=gnused

Reply via email to