Bug #15418 Updated: bzdecompress returning negative numbers instead of strings

From: Date: Fri, 17 May 2002 23:44:12 +0000
Subject: Bug #15418 Updated: bzdecompress returning negative numbers instead of strings
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-7967@lists.php.net to get a copy of this message
ID: 15418 Updated by: x86zman@bigfoot.com Reported By: epicanis+php@dogphilosophy.net Status: Closed Bug Type: Bzip2 Related Operating System: Linux (2.4.17 ix86) PHP Version: 4.1.1 New Comment: This bug is _STILL_ alive & exist also on Win32 , as i'm getting the same Result (neg. numbers instead of bzip2 compressed output) on Win2K.Srvr (SP2+SRP1) with PHP 4.2.1 (and before with 4.2 & 4.1.1 & 4.1.0) ... now it's reached the "report time" ., this should be a tiny glitch somewhere in this extension , please fix it ! Previous Comments: ------------------------------------------------------------------------ [2002-02-07 06:36:59] sander@php.net This is probably fixed in CVS. Reopen if it's not. ------------------------------------------------------------------------ [2002-02-06 21:56:17] epicanis+php@dogphilosophy.net This APPEARS that it may be a re-surgence of bug#12233, which was marked closed several months ago... I am getting bzcompressed strings into a script, which is then supposed to bzdecompress them and save the bzdecompressed strings to a file. What's coming out is the same sort of thing described in bug#12233 - instead of the strings I'm getting "-7-5-5-5-5"(etc.) I also tried grabbing the current CVS. I couldn't get ./buildconf to work right, but I did try copying the current files out of CVS's ext/bz2 directory over the top of 4.1.1's released files and recompiling 4.1.1 that way, but still no fix... Example (in the following example, '$fhandle' is an fopen'ed URL which is a script that opens a file and sends it as bzcompressed strings. THIS script has been tested, and works fine - I can use wget to fetch the same data and successfully bunzip2 it from the console. $savehandle is the local file that's been fopen'ed to save the bzdecompressed data to [and which is getting the "-7-5-5-5-5" in it...]) while(!feof($fhandle)) { $data=fread($fhandle,8192); $outdata=bzdecompress($data); fwrite($savehandle,$outdata); } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=15418&edit=1

« previous php.bugs (#7967) next »