From:             [EMAIL PROTECTED]
Operating system: Linux (2.4.17 ix86)
PHP version:      4.1.1
PHP Bug Type:     Bzip2 Related
Bug description:  bzdecompress returning negative numbers instead of strings

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 bug report at http://bugs.php.net/?id=15418&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=15418&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=15418&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=15418&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=15418&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=15418&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=15418&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=15418&r=notenoughinfo


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to