PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » File Formats » Archive_Tar » Bug #3687

Cannot create compressed archives on php://output

Details

Submitted2005-03-03 11:04 UTC
Frommstamat at csd dot uoc dot gr
StatusBogus
PackageArchive_Tar
PHP Version5.0.3
OSLinux
Roadmaps(Not assigned)

Comments

[2005-03-03 11:04 UTC] mstamat at csd dot uoc dot gr

Description:
------------
Cannot write compressed archive on php://stdout (instead of a regular file). This works fine when I do not use compression. Compressed regular files work fine.

Reproduce code:
---------------
<?php
require("Archive/Tar.php");
$tar = new Archive_Tar("php://output", 'gz');
$files = array(".");
header("Content-type: application/x-tar");
$tar->create($files) or die("Could not create archive!");
?>

Expected result:
----------------
I expected to get a compressed file on the output, that will trigger a download popup on my browser.

Actual result:
--------------
With bz2 compression I get nothing - no error, no output. With gz compression I get an error when I call create() method on the tar object.