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

Tar file management class

Download latest release 1.6.0 (there might be newer Composer installable version)

License: New BSD License

Description

This class provides handling of tar files in PHP.
It supports creating, listing, extracting and adding to tar files.
Gzip support is available if PHP has the zlib extension built-in or
loaded. Bz2 compression is also supported with the bz2 extension loaded.
Also Lzma2 compressed archives are supported with xz extension.

Documentation

Manual

Maintainers

Dependencies

Required

Releases

Bugs

IDStatusTypeVersionDateSummary
#948BogusBug2004-03-04pear freezes on install
#1034ClosedBug2004-03-19gzclose(): suppliead argument is not a valid stream resource
#1130ClosedBug2004-04-04none working bz2
#1306BogusBug2004-04-28Freeze on "pear package"
#1364ClosedBug2004-05-07package.xml contains Archive\Tar.
#1693ClosedBug2004-06-21Archive_Tar does not allow multiple addString()'s
#1719ClosedReq2004-06-25Report warning on unknown/unneccessary parameters
#2135ClosedBug2004-08-16Does not handle non-sequential file list indexes
#2176ClosedBug2004-08-20tar.gz always uncompressed
#2475ClosedBug2004-10-07BUGFIX of "Cannot add directories into the archive..."
#2488ClosedBug2004-10-10Syntax error
#2735No FeedbackBug2004-11-10Had trouble opening archive if I gave it an array of absolute paths
#3619ClosedBug2005-02-27CRITICAL: non-ISO-8859-1 characters in package.xml must be entitied
#3687BogusBug2005-03-03Cannot create compressed archives on php://output
#3694Wont fixBug2005-03-03"lone zero block" when untarring packages
#3772BogusBug2005-03-11hang on doing "pear install xxx" etc
#3855ClosedBug2005-03-16CRITICAL BC BREAK with 1.2 - pear package fails
#3907ClosedBug2005-03-22Undefined variable error (v. low priority)
#3909ClosedBug2005-03-22Undefined constant OS_WINDOWS
#3911Wont fixReq2005-03-22Easier error reporting, no PEAR overhead if not needed.
#4013ClosedReq2005-03-31Ignoring files and directories on creating an archive.
#4016ClosedBug2005-03-31owner, permissions and file date after addString()
#5452ClosedBug2005-09-19fix for "lone zero block" when untarring packages
#5632ClosedBug2005-10-08use of two @ unnecessary in single line
#6027DuplicateBug2005-11-211.3.2 generates invalid .tar files
#6103ClosedBug2005-11-29significant performance problem with large archives
#6486ClosedBug2006-01-13Can not extract symlinks
#6933ClosedBug1.3.12006-02-24Archive_Tar (Tar file management class) Directory traversal
#8114ClosedBug1.3.12006-07-04Files added on-the-fly not storing date
#8702BogusBug1.3.12006-09-14Directory case not obeyed / preserved
#9352ClosedBug1.3.12006-11-16Bug on _dirCheck function over nfs path
#9520SuspendedReq1.3.12006-12-01Doesn't allow in-memory manipulation of tar files
#9921ClosedBugCVS2007-01-22compression with bzip2 fails
#10145ClosedReq1.3.22007-02-21Patch to return a Pear Error Object on failure
#10159BogusBug1.3.22007-02-22png/gif problem
#10589BogusReq1.3.22007-04-02Patch: allows to exclude files/directories when an archive is created
#11171DuplicateBug1.3.22007-05-28Creating a bz2 archive is impossible
#11258ClosedReq1.3.22007-06-09Custom date/time in files added on-the-fly
#11594ClosedBug1.3.22007-07-12_readLongHeader leaves 0 bytes in filename
#11769ClosedBug1.3.22007-08-06Incorrect symlink handing
#11871ClosedBug1.3.22007-08-20wrong result of ::listContent() if filename begins or ends with space
#12462ClosedBug1.3.22007-11-16invalid tar magic
#13322No FeedbackBug1.3.22008-03-06Extracting of archive containing symlinks fails
#13361ClosedBug1.3.22008-03-10Unable to add() some files (ex. mp3)
#14318ClosedBug1.3.22008-07-09listContent() doesn't work under certain conditions
#14523ClosedBug1.3.22008-08-18results are consistently corrupted
#15114DuplicateBug1.3.22008-11-21Bz2 compression does not work
#15972ClosedBug2009-03-03Bz2 compression does not work on linux
#16202ClosedBug1.3.32009-05-07Bogus modification times
#16212ClosedReq1.3.32009-05-10Die is not exception
#16759ClosedBug1.3.32009-11-02No error thrown from missing PHP zlib functions
#16761DuplicateBug1.3.32009-11-02Archive_Tar->create() and ->extract() fail silently after upgrading to Karmic
#16860BogusBug1.3.32009-12-01Wrong archive file dates
#16958ClosedBug1.3.42009-12-31Update 'compatible' tag in package.xml
#16963ClosedBug1.3.52009-12-31extractList can't extract zipped files from big tar
#17093No FeedbackBug1.3.52010-02-12Tar file more 2Gb dont unpack
#17436BogusReqUnknown2010-05-25Handling xz and lzma archive
#17466Wont fixReq1.3.72010-06-04Perfomance improvement request in the call of fread at _jumpblock
#17491ClosedReq1.3.72010-06-14Option to preserve permissions
#17578No FeedbackBug1.3.72010-07-11Fail to read some POSIX tar files
#17809BogusDocSVN2010-08-24(Please close, not a bug)
#17813ClosedReqSVN2010-08-24Prevent PHP notice when extracting corrupted archive
#17853ClosedBugSVN2010-09-09Test failure: dirtraversal.phpt
#18505ClosedBugSVN2011-05-05Possible incorrect handling of file names in TAR
#18512ClosedBug1.3.72011-05-09dead links are not saved in tar file
#18702ClosedBug1.3.72011-08-02Unpacks incorrectly on long file names using header prefix
#18822BogusBugSVN2011-09-10undefined variable
#18823BogusBugSVN2011-09-10undefined variable
#18877ClosedBug1.3.72011-09-27Incorrect handling of backslashes in filenames on Linux
#18895BogusBug1.3.72011-10-08->extract() fails without throwing exception; ->listContent() returns int(0)
#19054BogusBugUnknown2011-11-18Junk Values
#19085ClosedBugSVN2011-11-27Error while packaging
#19289ClosedBug1.3.82012-02-13Invalid tar file generated
#19330ClosedBug1.3.92012-03-12Class creates incorrect (non-readable) tar.gz file
#19661BogusBug1.3.102012-10-21addModify is very slow in a loop
#19662DuplicateBug1.3.102012-10-21addModify is very slow in a loop
#19746ClosedBug1.3.102012-12-11Broken with PHP 5.5
#19827ClosedReqSVN2013-02-19pass filename to _addFile function - downstream patch
#19889BogusBug1.3.112013-04-09On I/O error methods should be throwing exceptions
#19964ClosedBug1.3.112013-05-29Memory leaking in Archive_Tar
#20132ClosedReq1.3.112013-11-21Add custom mode/uid/gid to addString()
#20246ClosedBug1.3.112014-04-19Broken with php 5.5.9
#20275ClosedBug1.3.112014-05-19"pax_global_header" looks like a regular file
#20366BogusBug1.3.122014-08-10windows8.1_x64 failure
#20382ClosedBug1.3.122014-08-31gzopen fix
#20393SpamReq1.3.132014-09-06Watch// The Amazing Spider-Man 2 [ONLINE FOR FREE]
#20511No FeedbackBug1.3.152015-03-05Error Installing New Package
#20514ClosedBug2015-03-11invalid package.xml; not installable with pyrus
#21058ClosedBug1.4.22016-04-28Long symlinks are not supported
#21143SpamBugUnknown2016-11-02jogi-1844-722-6675-Quickbooks support phone number
#21218ClosedBug2017-06-10Cannot use result of built-in function in write context in PHP 7.2.0alpha1
#23769FeedbackBug1.4.32018-09-19Archive_Tar in Tar::extractList fails to get file
#23782ClosedBug1.4.32018-12-20Prevent phar:// files from being extracted
#23788ClosedBug1.4.42018-12-26Relative symlinks are broken
#23861ClosedReq2019-12-04Add option to disallow symlinks
#23862BogusReq1.4.82019-12-04Add option to disallow symlinks
#27002ClosedBug1.4.102020-11-19Filename manipulation vulnerabilities (CVE-2020-28948 / CVE-2020-28949)
#27008ClosedBug1.4.112021-01-18Symlink out-of-path write vulnerability (CVE-2020-36193)
#27010ClosedBug1.4.122021-02-16Relative symlinks failing (out-of path file extraction)
#29033OpenBug1.5.02025-04-01test