From:             phpbugger dot 5 dot n1 at spamgourmet dot com
Operating system: Linux
PHP version:      5.2.1
PHP Bug Type:     Bzip2 Related
Bug description:  decompress.bzip2 is broken

Description:
------------
(See example code) - when using the bzip2.decompress filter on a
http://-stream, php uses a lot of CPU resources and hangs. Decompressing
with bzdecompress works, however, as does using zlib.decompress filters on
.gz files via HTTP.

Reproduce code:
---------------
<?php

$url = 'http://php.net/backend/notes/all.bz2';
$url =
'http://de.archive.ubuntu.com/ubuntu/dists/edgy/restricted/binary-i386/Packages.bz2';

/* this works: */
$data = bzdecompress(file_get_contents($url));
echo "bzdecompress is finished!\n";



/* however, file_get_contents will block while PHP uses a lot of CPU time
*/
$fp = fopen($url,'rb');
stream_filter_append($fp, 'bzip2.decompress');
stream_get_contents($fp);
echo "stream_get_contents is finished!\n"

?>



-- 
Edit bug report at http://bugs.php.net/?id=40437&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=40437&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=40437&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=40437&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=40437&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=40437&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=40437&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=40437&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=40437&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=40437&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=40437&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=40437&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=40437&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=40437&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=40437&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=40437&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=40437&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=40437&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=40437&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=40437&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=40437&r=mysqlcfg

Reply via email to