Home » File Formats » Archive_Tar » Bug #3687
Cannot create compressed archives on php://output
Details
| Submitted | 2005-03-03 11:04 UTC |
|---|---|
| From | mstamat at csd dot uoc dot gr |
| Status | Bogus |
| Package | Archive_Tar |
| PHP Version | 5.0.3 |
| OS | Linux |
| 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.