rar pecl.php.net rar extension PHP extension for reading RAR archives using bundled unRAR library. Gustavo Lopes cataphract cataphract@php.net yes Antony Dovgal tony2001 tony@daylessday.org no 2026-03-08 4.3.0 4.0.0 stable stable PHP License - Add PHP 8.1, 8.2, 8.3, 8.4, 8.5 support. - Drop PHP 5 support; minimum PHP version is now 7.0. - Update bundled unrar to 7.2.4. - Fix Windows bug 7.0.0 1.4.0 rar 4.3.0 4.0.0 stable stable 2026-03-08 Changes in this version: - Add PHP 8.1, 8.2, 8.3 support. - Drop PHP 5 support; minimum PHP version is now 7.0. - Update bundled unrar to 7.2.4. - Fix segfault caused by uninitialized RARHeaderDataEx. - Fix dll.cpp: don't propagate non-fatal ErrHandler errors as failures. - Fix RAR5 chunk extraction spurious warning on Windows with multi-core CPUs. - Migrate CI from Azure Pipelines/Appveyor to GitHub Actions. 4.2.0 4.0.0 stable stable 2020-12-06 Changes in this version: - Support PHP 8. - Merge unrar 6.0.2. - RarArchive implements IteratorAggregate (PHP 8 only). 4.1.0 4.0.0 stable stable 2020-10-11 Changes in this version: - Merge changes made to unrar up to version 5.5.6. - Support PHP 7.2, PHP 7.3 and PHP 7.4. - Update to unrar 5.9.4. - Fix bug #76592: streaming unpacking of uncompressed files incomplete. 4.0.0 4.0.0 stable stable 2017-07-22 Changes in this version: - Added functions RarEntry::getRedirType(), RarEntry::isRedirectToDirectory() and RarEntry::getRedirTarget(), as well as the following constants on RarEntry: FSREDIR_UNIXSYMLINK, FSREDIR_WINSYMLINK, FSREDIR_JUNCTION, FSREDIR_HARDLINK and FSREDIR_FILECOPY. - Changed stat handler to return UTC time for creation, modification and access time (does not work reliably on Windows). - Fix cloning of RarArchive being allowed. 3.0.2 3.0.0 stable stable 2013-10-11 Changes in this version: - Fixed build with PHP 5.5. - Upgraded bundled unrar to version 4.2.4. 3.0.1 3.0.0 stable stable 2012-07-29 Changes in this version: - Merge changes made to unrar up to version 4.2.2. - Fix leak in PHP >= 5.3.11, = 5.4.0 and compile error in master. - Fix some tests failing if TZ != Europe/Lisbon. - Fix bad pointer in an error message. - Added test for bug #59939 (can't reproduce). 2.0.0 2.0.0 stable stable 2010-04-20 Changes with respect to release 2.0.0RC1: - Fixed infinite loop when opening RAR archive missing a volume (later report in bug #17177). - Fixed bug #17025 (changed the name of method RarArchive::list into RarArchive::getEntries). If backwards compatibility with the release candidate is required, RarArchive::list can be reintroduced by defining RAR_ARCHIVE_LIST_ALIAS. Incompatible changes with respect to release 1.0.0: PHP Support: - Support for PHP 4.3 dropped. PHP 5.2.x or 5.3.x is required. API backwards incompatible changes: - Handles unicode filenames (uses UTF-8 external encoding). The file names inside the RAR archives are always returned in UTF-8. This will probably break your scripts. - Calling rar_close/RarArchive::close() invalidates RarEntry objects (actually, only extraction is forbidden, but don't rely on it). For the other changes, see the changelog for version 2.0.0RC1. 2.0.0RC1 2.0.0RC1 beta beta 2010-01-17 PHP License and UnRar license Changes in respect to release 1.0.0: PHP SUPPORT: - Support for PHP 4.3 dropped. PHP 5.2.x or 5.3.x is required. API BACKWARDS INCOMPATIBLE CHANGES: - Handles unicode filenames (uses UTF-8 external encoding). The file names inside the RAR archives are always returned in UTF-8. This will probably break your scripts. - Calling rar_close/RarArchive::close() invalidates RarEntry objects (actually, only extraction is forbidden, but don't rely on it). API backwards compatible changes: - Supports streaming from RAR archives. See RarEntry::getStream() method. - Added a bunch of constants to RarEntry. - Added RarEntry::__toString() method. - Added RarEntry::isDirectory() method. - Added RarEntry::isEncrypted() method. - Added OOP interface for rar_* functions with the RarArchive class. - Added rar_comment_get/RarArchive::getComment(). - Added RarArchive::isSolid()/rar_solid_is(). - Added RarArchive::__toString() method. - Added RarException class. - Exception throwing for expectable errors can be turned on by calling RarException::setUsingExceptions(). To check whether exception throwing is turned on, RarException::isUsingExceptions() can be used. Bug fixes: - Fixed by PECL bug #8821 (relative paths not working). - Fixed PECL bug #9470 (wrong CRC on multi-volume archives). - Fixed PECL bug #9649 (rar_close() not closing file descriptors if there were undestroyed RarEntry objects) - Fixed volumes opened with middle volumes showing files continued from previous volume with incorrect packed and unpacked sizes. - Fixed bug in UnRAR library that could cause a read out of buffer bounds on some corrupted RAR files. - Fixed RarEntry::getPackedSize() and RarEntry::getUnpackedSize() giving incorrect results for files > 2 GiB. Still, on platforms with 32-bit integers, MAX_INT will be returned for such files, othwerwise the correct value is given. Other changes: - Updated bundled UnRAR library to version 3.9.7 (RAR 3.9.1). - Changed bundled UnRAR library to allow partial file extraction. - All RarEntry properties are now private. This doesn't break the API because those properties were never part of the contract. - rar_open gives more detailed error messages on failure. - Extension now uses extended UnRAR library structures. - Added arginfo. - Added a bunch of tests. - A lot of refactoring and compilation as C, not C++. 1.0.0 1.0.0 stable stable 2008-02-26 PHP License - Upgraded bundled UnRar to version 3.7.8. - Updated source code to use new parameter parsing API. - Fixed PECL bug #9002 (rar_list invalidates rar resource) - Fixed PECL bug #11430 (rar_extract() doesn't close handles gracefully) - rar_open() now throws an error when failed to open the specified file. 0.3.1 0.3.1 beta beta 2006-08-28 PHP License - Updated bundled unrar to version 3.6.8. - Fixed PHP4 compatibility. 0.3.0 0.3.0 beta beta 2006-06-06 PHP License - Updated bundled unrar to version 3.6.2 (fixes compile errors with GCC4). - Several minor fixes. 0.2 0.2 beta beta 2004-12-02 PHP License 1) Added open_basedir and safe_mode checks. 2) Fixed Win32 build issues (thanks to Edin). Currently only 5.x builds are available. 3) Added OS constants. 4) Fixed 0 bugs. There are no bugs, wee =) 0.1 0.1 alpha alpha 2004-06-11 PHP License 1) Initial release