gzinflate and HTTP_RAW_POST_DATA problem

From: Date: Mon, 04 Feb 2002 01:38:34 +0000
Subject: gzinflate and HTTP_RAW_POST_DATA problem
Groups: php.general 
Request: Send a blank email to php-general+get-83341@lists.php.net to get a copy of this message
I'm sending Content-type: application/x-gzip to a PHP script, and I successfully write it to a file using the HTTP_RAW_POST_DATA variable, and can then gunzip it. What confuses me is that I *cannot* use the gzinflate function with the same compressed data. In other words, the first method works, but the second does not. Why? First: $f = fopen("/tmp/foo.gz","w"); fwrite($f,$HTTP_RAW_POST_DATA); fclose($f); $f = gzopen("/tmp/foo.gz","r"); $pixels = gzread($f,250000); gzclose($f); Second: $pixels = gzinflate($HTTP_RAW_POST_DATA,250000); ERROR!! <b>Warning</b>: gzinflate: data error in <b>saver.php</b> on line <b>8</b><br> I don't get it. It's the same data, right? Noisey Apache/1.3.12 (Unix) ApacheJServ/1.1.2 mod_mp3/0.25 PHP/4.0.6

« previous php.general (#83341) next »