Bug #17300 Updated: bzcompress always outs "-8"

From: Date: Tue, 11 Jun 2002 15:49:31 +0000
Subject: Bug #17300 Updated: bzcompress always outs "-8"
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-10123@lists.php.net to get a copy of this message
 ID:               17300
 Updated by:       x86zman@bigfoot.com
 Reported By:      x86zman@bigfoot.com
 Status:           Analyzed
 Bug Type:         Bzip2 Related
 Operating System: Windows
 PHP Version:      4.3.0-dev
 New Comment:

Finally one takes a Full Checking upon this extension...


Previous Comments:
------------------------------------------------------------------------

[2002-06-11 11:44:13] mfischer@php.net

Confirmed, finally. ext/bz2 is broken in Release_TS, but works in
Debug_TS.

------------------------------------------------------------------------

[2002-06-11 10:43:12] x86zman@bigfoot.com

i could'nt supply the whole script as it relies on external classes -
but i've verified this code to generate the "-8" too !

than Here you go :

<?php

$test_data = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

if (@function_exists('bzcompress'))
{
$test_data = bzcompress($test_data,9);
}
else { die(); }

// Send headers to the Browser (so it treats the output as a downloaded
file)

ob_start(); // Output Buffering - Enables "Late" Header Transmission

header('Content-Type: application/x-bzip');

if ($_ENV["ETS_BROWSER_AGENT"] == 'IE') // IE need specific headers
{
        header('Content-Length: '.strlen($test_data));
        header('Content-Disposition: inline;
filename="test_data.bz2"');
        header('Expires: 0');
        header('Cache-Control: must-revalidate, post-check=0,
pre-check=0');
        header('Pragma: public');
}
else
{
        header('Content-Length: '.strlen($test_data));
        header('Content-Disposition: attachment;
filename="test_data.bz2"');
        header('Expires: 0');
        header('Pragma: no-cache');
}

ob_end_clean(); // Output Buffering - End Cleanly

echo $test_data; // Output the File Contents Itself !

// File Download - Ends

?>

------------------------------------------------------------------------

[2002-06-11 01:13:02] mfischer@php.net

Give a small self-contained script which fails for you.

I wonder why it fails, it worked for me.


------------------------------------------------------------------------

[2002-06-10 22:43:28] x86zman@bigfoot.com

just marking the 4.3.0-dev too for carring this bug !

------------------------------------------------------------------------

[2002-06-10 22:42:17] x86zman@bigfoot.com

is was using php4-win32-STABLE-200206110000.zip (and the "-latest" too
!) snap for testing , and guess what -> this bug is still alive ! (how
unexpected ... ;)

and you may ref. this a docu. bug, but even so i've tested against the
newest docs. in the site and in the d/lable man.(s) - nothing has
changed !

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/17300

-- 
Edit this bug report at http://bugs.php.net/?id=17300&edit=1



Thread (14 messages)

« previous php.bugs (#10123) next »