Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.4.14

Bug #14523 results are consistently corrupted
Submitted: 2008-08-18 19:36 UTC
From: sharoncorrell Assigned: mrook
Status: Closed Package: Archive_Tar (version 1.3.2)
PHP Version: 5.2.5 OS: Windows XP
Roadmaps: (Not assigned)    

 [2008-08-18 19:36 UTC] sharoncorrell (Sharon Correll)
Description: ------------ It seems like I MUST be doing something wrong, but this package is not working for me at all. It seemed to work fine for very small text files, but when I tried life-sized files of various types, the results always seem corrupted in various ways. The files are missing or truncated, or the names are truncated, and graphics files (eg PNG) are never readable. Test script: --------------- $files_to_zip = array(); $files_to_zip[] = "C:/Cree.png"; $files_to_zip[] = "C:/data.xml"; $zip_filename = "C:/test.tgz"; $oTar = new Archive_Tar( $zip_filename, "gz" ); $oTar->create( $files_to_zip ); Expected result: ---------------- I would expect it to generate a file called "test.tgz" that I could open with WinZIP (which is generally happy to open .TAR and .TGZ files). The tar file would contain two files: Cree.png and data.xml. Actual result: -------------- For the example above, I get a .TGZ file containing only the .PNG file, not the .XML one. And when I tried to open the .PNG, it is corrupted. When I tried using a different directory, I got slightly different but equally unsatisfactory results. I get similar results trying to generate an uncompressed .TAR file.


 [2008-08-18 19:40 UTC] sharoncorrell (Sharon Correll)
Sorry, I thought there would be a way to attch my sample files, but it doesn't seem to be possible to attach my .PNG.
 [2008-08-19 04:26 UTC] doconnor (Daniel O'Connor)
Flickr or photobucket or something?
 [2008-08-19 21:32 UTC] sharoncorrell (Sharon Correll)
Even without the .PNG...just trying to zip up an .XML file (8 K) doesn't work--the file is truncated by a handful of characters (about 17-18). In one case I tried zipping 3 files. The first file is truncated and the name of the second file is embedded in it.
 [2008-12-12 15:01 UTC] chrisdunavant (Christopher Dunavant)
I'm seeing the same issue on an Ubuntu platform. I did a little more testing and found that the problem doesn't occur when just doing a "tar" file output but occurs when adding "gzip" compression. I also found that Revision 1.29 of Tar.php worked fine and Revision 1.32 had the problem. I tried to do a diff between the two revisions to see if I could see anything obvious but it wasn't clear what might be the culprit. BTW, I am using "addString" to add all the files to the archive. Another odd fact is that it works fine if I only add things like PDF files, JPG files, XLS files but if I add a Word doc (I tried several different Word files) it doesn't work. I'd be happy to provide more information if needed. Thanks!
 [2009-03-27 06:33 UTC] dufuz (Helgi Þormar Þorbjörnsson)
Does revision 1.39 or above fix it ? 1.39 contains a rewrite of exactly what is diffed between 1.29 and 1.32 Archive_Tar-1.3.3 will soon be out, be on a look out and see if the issue still persists.
 [2009-08-19 02:57 UTC] mrook (Michiel Rook)
-Status: Open +Status: Feedback
Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PEAR better. Hi, can you confirm that this problem still exists using version 1.3.3 of Archive_Tar?
 [2009-08-19 02:58 UTC] mrook (Michiel Rook)
Thank you for taking the time to report a problem with the package. Unfortunately you are not using a current version of the package -- the problem might already be fixed. Please download a new version from If you are able to reproduce the bug with one of the latest versions, please change the package version on this bug report to the version you tested and change the status back to "Open". Again, thank you for your continued support of PEAR. Hi, can you confirm that this problem still exists using version 1.3.3 of Archive_Tar?
 [2009-08-19 19:21 UTC] sharoncorrell (Sharon Correll)
I switched to using the File_Archive package instead. So I don't have an easy way to tell if the problem has been fixed.
 [2009-12-31 04:06 UTC] mrook (Michiel Rook)
Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PEAR.
 [2009-12-31 04:07 UTC] mrook (Michiel Rook)
-Status: Feedback +Status: Closed -Assigned To: +Assigned To: mrook
 [2009-12-31 04:07 UTC] mrook (Michiel Rook)
-Roadmap Versions: 1.3.4 +Roadmap Versions: