commit
a88c1d61c9
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,376 +1,421 @@ |
|||||||
// -------------------------------------------------------------------------------- |
// -------------------------------------------------------------------------------- |
||||||
// PclZip 2.6 - readme.txt |
// PclZip 2.8.2 - readme.txt |
||||||
// -------------------------------------------------------------------------------- |
// -------------------------------------------------------------------------------- |
||||||
// License GNU/LGPL - March 2006 |
// License GNU/LGPL - August 2009 |
||||||
// Vincent Blavet - vincent@phpconcept.net |
// Vincent Blavet - vincent@phpconcept.net |
||||||
// http://www.phpconcept.net |
// http://www.phpconcept.net |
||||||
// -------------------------------------------------------------------------------- |
// -------------------------------------------------------------------------------- |
||||||
// $Id: readme.txt 17088 2008-12-07 02:53:53Z ivantcholakov $ |
// $Id: readme.txt,v 1.60 2009/09/30 20:35:21 vblavet Exp $ |
||||||
// -------------------------------------------------------------------------------- |
// -------------------------------------------------------------------------------- |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
0 - Sommaire |
0 - Sommaire |
||||||
============ |
============ |
||||||
1 - Introduction |
1 - Introduction |
||||||
2 - What's new |
2 - What's new |
||||||
3 - Corrected bugs |
3 - Corrected bugs |
||||||
4 - Known bugs or limitations |
4 - Known bugs or limitations |
||||||
5 - License |
5 - License |
||||||
6 - Warning |
6 - Warning |
||||||
7 - Documentation |
7 - Documentation |
||||||
8 - Author |
8 - Author |
||||||
9 - Contribute |
9 - Contribute |
||||||
|
|
||||||
1 - Introduction |
1 - Introduction |
||||||
================ |
================ |
||||||
|
|
||||||
PclZip is a library that allow you to manage a Zip archive. |
PclZip is a library that allow you to manage a Zip archive. |
||||||
|
|
||||||
Full documentation about PclZip can be found here : http://www.phpconcept.net/pclzip |
Full documentation about PclZip can be found here : http://www.phpconcept.net/pclzip |
||||||
|
|
||||||
2 - What's new |
2 - What's new |
||||||
============== |
============== |
||||||
|
|
||||||
Version 2.6 : |
Version 2.8.2 : |
||||||
- Code optimisation |
- PCLZIP_CB_PRE_EXTRACT and PCLZIP_CB_POST_EXTRACT are now supported with |
||||||
- New attributes PCLZIP_ATT_FILE_COMMENT gives the ability to |
extraction as a string (PCLZIP_OPT_EXTRACT_AS_STRING). The string |
||||||
add a comment for a specific file. (Don't really know if this is usefull) |
can also be modified in the post-extract call back. |
||||||
- New attribute PCLZIP_ATT_FILE_CONTENT gives the ability to add a string |
**Bugs correction : |
||||||
as a file. |
- PCLZIP_OPT_REMOVE_ALL_PATH was not working correctly |
||||||
- New attribute PCLZIP_ATT_FILE_MTIME modify the timestamp associated with |
- Remove use of eval() and do direct call to callback functions |
||||||
a file. |
- Correct support of 64bits systems (Thanks to WordPress team) |
||||||
- Correct a bug. Files archived with a timestamp with 0h0m0s were extracted |
|
||||||
with current time |
Version 2.8.1 : |
||||||
- Add CRC value in the informations returned back for each file after an |
- Move option PCLZIP_OPT_BY_EREG to PCLZIP_OPT_BY_PREG because ereg() is |
||||||
action. |
deprecated in PHP 5.3. When using option PCLZIP_OPT_BY_EREG, PclZip will |
||||||
- Add missing closedir() statement. |
automatically replace it by PCLZIP_OPT_BY_PREG. |
||||||
- When adding a folder, and removing the path of this folder, files were |
|
||||||
incorrectly added with a '/' at the beginning. Which means files are |
Version 2.8 : |
||||||
related to root in unix systems. Corrected. |
- Improve extraction of zip archive for large files by using temporary files |
||||||
- Add conditional if before constant definition. This will allow users |
This feature is working like the one defined in r2.7. |
||||||
to redefine constants without changing the file, and then improve |
Options are renamed : PCLZIP_OPT_TEMP_FILE_ON, PCLZIP_OPT_TEMP_FILE_OFF, |
||||||
upgrade of pclzip code for new versions. |
PCLZIP_OPT_TEMP_FILE_THRESHOLD |
||||||
|
- Add a ratio constant PCLZIP_TEMPORARY_FILE_RATIO to configure the auto |
||||||
Version 2.5 : |
sense of temporary file use. |
||||||
- Introduce the ability to add file/folder with individual properties (file descriptor). |
- Bug correction : Reduce filepath in returned file list to remove ennoying |
||||||
This gives for example the ability to change the filename of a zipped file. |
'.//' preambule in file path. |
||||||
. Able to add files individually |
|
||||||
. Able to change full name |
Version 2.7 : |
||||||
. Able to change short name |
- Improve creation of zip archive for large files : |
||||||
. Compatible with global options |
PclZip will now autosense the configured memory and use temporary files |
||||||
- New attributes : PCLZIP_ATT_FILE_NAME, PCLZIP_ATT_FILE_NEW_SHORT_NAME, PCLZIP_ATT_FILE_NEW_FULL_NAME |
when large file is suspected. |
||||||
- New error code : PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE |
This feature can also ne triggered by manual options in create() and add() |
||||||
- Add a security control feature. PclZip can extract any file in any folder |
methods. 'PCLZIP_OPT_ADD_TEMP_FILE_ON' force the use of temporary files, |
||||||
of a system. People may use this to upload a zip file and try to override |
'PCLZIP_OPT_ADD_TEMP_FILE_OFF' disable the autosense technic, |
||||||
a system file. The PCLZIP_OPT_EXTRACT_DIR_RESTRICTION will give the |
'PCLZIP_OPT_ADD_TEMP_FILE_THRESHOLD' allow for configuration of a size |
||||||
ability to forgive any directory transversal behavior. |
threshold to use temporary files. |
||||||
- New PCLZIP_OPT_EXTRACT_DIR_RESTRICTION : check extraction path |
Using "temporary files" rather than "memory" might take more time, but |
||||||
- New error code : PCLZIP_ERR_DIRECTORY_RESTRICTION |
might give the ability to zip very large files : |
||||||
- Modification in PclZipUtilPathInclusion() : dir and path beginning with ./ will be prepend |
Tested on my win laptop with a 88Mo file : |
||||||
by current path (getcwd()) |
Zip "in-memory" : 18sec (max_execution_time=30, memory_limit=180Mo) |
||||||
|
Zip "tmporary-files" : 23sec (max_execution_time=30, memory_limit=30Mo) |
||||||
Version 2.4 : |
- Replace use of mktime() by time() to limit the E_STRICT error messages. |
||||||
- Code improvment : try to speed up the code by removing unusefull call to pack() |
- Bug correction : When adding files with full windows path (drive letter) |
||||||
- Correct bug in delete() : delete() should be called with no argument. This was not |
PclZip is now working. Before, if the drive letter is not the default |
||||||
the case in 2.3. This is corrected in 2.4. |
path, PclZip was not able to add the file. |
||||||
- Correct a bug in path_inclusion function. When the path has several '../../', the |
|
||||||
result was bad. |
Version 2.6 : |
||||||
- Add a check for magic_quotes_runtime configuration. If enabled, PclZip will |
- Code optimisation |
||||||
disable it while working and det it back to its original value. |
- New attributes PCLZIP_ATT_FILE_COMMENT gives the ability to |
||||||
This resolve a lots of bad formated archive errors. |
add a comment for a specific file. (Don't really know if this is usefull) |
||||||
- Bug correction : PclZip now correctly unzip file in some specific situation, |
- New attribute PCLZIP_ATT_FILE_CONTENT gives the ability to add a string |
||||||
when compressed content has same size as uncompressed content. |
as a file. |
||||||
- Bug correction : When selecting option 'PCLZIP_OPT_REMOVE_ALL_PATH', |
- New attribute PCLZIP_ATT_FILE_MTIME modify the timestamp associated with |
||||||
directories are not any more created. |
a file. |
||||||
- Code improvment : correct unclosed opendir(), better handling of . and .. in |
- Correct a bug. Files archived with a timestamp with 0h0m0s were extracted |
||||||
loops. |
with current time |
||||||
|
- Add CRC value in the informations returned back for each file after an |
||||||
|
action. |
||||||
Version 2.3 : |
- Add missing closedir() statement. |
||||||
- Correct a bug with PHP5 : affecting the value 0xFE49FFE0 to a variable does not |
- When adding a folder, and removing the path of this folder, files were |
||||||
give the same result in PHP4 and PHP5 .... |
incorrectly added with a '/' at the beginning. Which means files are |
||||||
|
related to root in unix systems. Corrected. |
||||||
Version 2.2 : |
- Add conditional if before constant definition. This will allow users |
||||||
- Try development of PCLZIP_OPT_CRYPT ..... |
to redefine constants without changing the file, and then improve |
||||||
However this becomes to a stop. To crypt/decrypt I need to multiply 2 long integers, |
upgrade of pclzip code for new versions. |
||||||
the result (greater than a long) is not supported by PHP. Even the use of bcmath |
|
||||||
functions does not help. I did not find yet a solution ...; |
Version 2.5 : |
||||||
- Add missing '/' at end of directory entries |
- Introduce the ability to add file/folder with individual properties (file descriptor). |
||||||
- Check is a file is encrypted or not. Returns status 'unsupported_encryption' and/or |
This gives for example the ability to change the filename of a zipped file. |
||||||
error code PCLZIP_ERR_UNSUPPORTED_ENCRYPTION. |
. Able to add files individually |
||||||
- Corrected : Bad "version need to extract" field in local file header |
. Able to change full name |
||||||
- Add private method privCheckFileHeaders() in order to check local and central |
. Able to change short name |
||||||
file headers. PclZip is now supporting purpose bit flag bit 3. Purpose bit flag bit 3 gives |
. Compatible with global options |
||||||
the ability to have a local file header without size, compressed size and crc filled. |
- New attributes : PCLZIP_ATT_FILE_NAME, PCLZIP_ATT_FILE_NEW_SHORT_NAME, PCLZIP_ATT_FILE_NEW_FULL_NAME |
||||||
- Add a generic status 'error' for file status |
- New error code : PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE |
||||||
- Add control of compression type. PclZip only support deflate compression method. |
- Add a security control feature. PclZip can extract any file in any folder |
||||||
Before v2.2, PclZip does not check the compression method used in an archive while |
of a system. People may use this to upload a zip file and try to override |
||||||
extracting. With v2.2 PclZip returns a new error status for a file using an unsupported |
a system file. The PCLZIP_OPT_EXTRACT_DIR_RESTRICTION will give the |
||||||
compression method. New status is "unsupported_compression". New error code is |
ability to forgive any directory transversal behavior. |
||||||
PCLZIP_ERR_UNSUPPORTED_COMPRESSION. |
- New PCLZIP_OPT_EXTRACT_DIR_RESTRICTION : check extraction path |
||||||
- Add optional attribute PCLZIP_OPT_STOP_ON_ERROR. This will stop the extract of files |
- New error code : PCLZIP_ERR_DIRECTORY_RESTRICTION |
||||||
when errors like 'a folder with same name exists' or 'a newer file exists' or |
- Modification in PclZipUtilPathInclusion() : dir and path beginning with ./ will be prepend |
||||||
'a write protected file' exists, rather than set a status for the concerning file |
by current path (getcwd()) |
||||||
and resume the extract of the zip. |
|
||||||
- Add optional attribute PCLZIP_OPT_REPLACE_NEWER. This will force, during an extract' the |
Version 2.4 : |
||||||
replacement of the file, even if a newer version of the file exists. |
- Code improvment : try to speed up the code by removing unusefull call to pack() |
||||||
Note that today if a file with the same name already exists but is older it will be |
- Correct bug in delete() : delete() should be called with no argument. This was not |
||||||
replaced by the extracted one. |
the case in 2.3. This is corrected in 2.4. |
||||||
- Improve PclZipUtilOption() |
- Correct a bug in path_inclusion function. When the path has several '../../', the |
||||||
- Support of zip archive with trailing bytes. Before 2.2, PclZip checks that the central |
result was bad. |
||||||
directory structure is the last data in the archive. Crypt encryption/decryption of |
- Add a check for magic_quotes_runtime configuration. If enabled, PclZip will |
||||||
zip archive put trailing 0 bytes after decryption. PclZip is now supporting this. |
disable it while working and det it back to its original value. |
||||||
|
This resolve a lots of bad formated archive errors. |
||||||
Version 2.1 : |
- Bug correction : PclZip now correctly unzip file in some specific situation, |
||||||
- Add the ability to abort the extraction by using a user callback function. |
when compressed content has same size as uncompressed content. |
||||||
The user can now return the value '2' in its callback which indicates to stop the |
- Bug correction : When selecting option 'PCLZIP_OPT_REMOVE_ALL_PATH', |
||||||
extraction. For a pre call-back extract is stopped before the extration of the current |
directories are not any more created. |
||||||
file. For a post call back, the extraction is stopped after. |
- Code improvment : correct unclosed opendir(), better handling of . and .. in |
||||||
- Add the ability to extract a file (or several files) directly in the standard output. |
loops. |
||||||
This is done by the new parameter PCLZIP_OPT_EXTRACT_IN_OUTPUT with method extract(). |
|
||||||
- Add support for parameters PCLZIP_OPT_COMMENT, PCLZIP_OPT_ADD_COMMENT, |
|
||||||
PCLZIP_OPT_PREPEND_COMMENT. This will create, replace, add, or prepend comments |
Version 2.3 : |
||||||
in the zip archive. |
- Correct a bug with PHP5 : affecting the value 0xFE49FFE0 to a variable does not |
||||||
- When merging two archives, the comments are not any more lost, but merged, with a |
give the same result in PHP4 and PHP5 .... |
||||||
blank space separator. |
|
||||||
- Corrected bug : Files are not deleted when all files are asked to be deleted. |
Version 2.2 : |
||||||
- Corrected bug : Folders with name '0' made PclZip to abort the create or add feature. |
- Try development of PCLZIP_OPT_CRYPT ..... |
||||||
|
However this becomes to a stop. To crypt/decrypt I need to multiply 2 long integers, |
||||||
|
the result (greater than a long) is not supported by PHP. Even the use of bcmath |
||||||
Version 2.0 : |
functions does not help. I did not find yet a solution ...; |
||||||
***** Warning : Some new features may break the backward compatibility for your scripts. |
- Add missing '/' at end of directory entries |
||||||
Please carefully read the readme file. |
- Check is a file is encrypted or not. Returns status 'unsupported_encryption' and/or |
||||||
- Add the ability to delete by Index, name and regular expression. This feature is |
error code PCLZIP_ERR_UNSUPPORTED_ENCRYPTION. |
||||||
performed by the method delete(), which uses the optional parameters |
- Corrected : Bad "version need to extract" field in local file header |
||||||
PCLZIP_OPT_BY_INDEX, PCLZIP_OPT_BY_NAME, PCLZIP_OPT_BY_EREG or PCLZIP_OPT_BY_PREG. |
- Add private method privCheckFileHeaders() in order to check local and central |
||||||
- Add the ability to extract by regular expression. To extract by regexp you must use the method |
file headers. PclZip is now supporting purpose bit flag bit 3. Purpose bit flag bit 3 gives |
||||||
extract(), with the option PCLZIP_OPT_BY_EREG or PCLZIP_OPT_BY_PREG |
the ability to have a local file header without size, compressed size and crc filled. |
||||||
(depending if you want to use ereg() or preg_match() syntax) followed by the |
- Add a generic status 'error' for file status |
||||||
regular expression pattern. |
- Add control of compression type. PclZip only support deflate compression method. |
||||||
- Add the ability to extract by index, directly with the extract() method. This is a |
Before v2.2, PclZip does not check the compression method used in an archive while |
||||||
code improvment of the extractByIndex() method. |
extracting. With v2.2 PclZip returns a new error status for a file using an unsupported |
||||||
- Add the ability to extract by name. To extract by name you must use the method |
compression method. New status is "unsupported_compression". New error code is |
||||||
extract(), with the option PCLZIP_OPT_BY_NAME followed by the filename to |
PCLZIP_ERR_UNSUPPORTED_COMPRESSION. |
||||||
extract or an array of filenames to extract. To extract all a folder, use the folder |
- Add optional attribute PCLZIP_OPT_STOP_ON_ERROR. This will stop the extract of files |
||||||
name rather than the filename with a '/' at the end. |
when errors like 'a folder with same name exists' or 'a newer file exists' or |
||||||
- Add the ability to add files without compression. This is done with a new attribute |
'a write protected file' exists, rather than set a status for the concerning file |
||||||
which is PCLZIP_OPT_NO_COMPRESSION. |
and resume the extract of the zip. |
||||||
- Add the attribute PCLZIP_OPT_EXTRACT_AS_STRING, which allow to extract a file directly |
- Add optional attribute PCLZIP_OPT_REPLACE_NEWER. This will force, during an extract' the |
||||||
in a string without using any file (or temporary file). |
replacement of the file, even if a newer version of the file exists. |
||||||
- Add constant PCLZIP_SEPARATOR for static configuration of filename separators in a single string. |
Note that today if a file with the same name already exists but is older it will be |
||||||
The default separator is now a comma (,) and not any more a blank space. |
replaced by the extracted one. |
||||||
THIS BREAK THE BACKWARD COMPATIBILITY : Please check if this may have an impact with |
- Improve PclZipUtilOption() |
||||||
your script. |
- Support of zip archive with trailing bytes. Before 2.2, PclZip checks that the central |
||||||
- Improve algorythm performance by removing the use of temporary files when adding or |
directory structure is the last data in the archive. Crypt encryption/decryption of |
||||||
extracting files in an archive. |
zip archive put trailing 0 bytes after decryption. PclZip is now supporting this. |
||||||
- Add (correct) detection of empty filename zipping. This can occurs when the removed |
|
||||||
path is the same |
Version 2.1 : |
||||||
as a zipped dir. The dir is not zipped (['status'] = filtered), only its content. |
- Add the ability to abort the extraction by using a user callback function. |
||||||
- Add better support for windows paths (thanks for help from manus@manusfreedom.com). |
The user can now return the value '2' in its callback which indicates to stop the |
||||||
- Corrected bug : When the archive file already exists with size=0, the add() method |
extraction. For a pre call-back extract is stopped before the extration of the current |
||||||
fails. Corrected in 2.0. |
file. For a post call back, the extraction is stopped after. |
||||||
- Remove the use of OS_WINDOWS constant. Use php_uname() function rather. |
- Add the ability to extract a file (or several files) directly in the standard output. |
||||||
- Control the order of index ranges in extract by index feature. |
This is done by the new parameter PCLZIP_OPT_EXTRACT_IN_OUTPUT with method extract(). |
||||||
- Change the internal management of folders (better handling of internal flag). |
- Add support for parameters PCLZIP_OPT_COMMENT, PCLZIP_OPT_ADD_COMMENT, |
||||||
|
PCLZIP_OPT_PREPEND_COMMENT. This will create, replace, add, or prepend comments |
||||||
|
in the zip archive. |
||||||
Version 1.3 : |
- When merging two archives, the comments are not any more lost, but merged, with a |
||||||
- Removing the double include check. This is now done by include_once() and require_once() |
blank space separator. |
||||||
PHP directives. |
- Corrected bug : Files are not deleted when all files are asked to be deleted. |
||||||
- Changing the error handling mecanism : Remove the use of an external error library. |
- Corrected bug : Folders with name '0' made PclZip to abort the create or add feature. |
||||||
The former PclError...() functions are replaced by internal equivalent methods. |
|
||||||
By changing the environment variable PCLZIP_ERROR_EXTERNAL you can still use the former library. |
|
||||||
Introducing the use of constants for error codes rather than integer values. This will help |
Version 2.0 : |
||||||
in futur improvment. |
***** Warning : Some new features may break the backward compatibility for your scripts. |
||||||
Introduction of error handling functions like errorCode(), errorName() and errorInfo(). |
Please carefully read the readme file. |
||||||
- Remove the deprecated use of calling function with arguments passed by reference. |
- Add the ability to delete by Index, name and regular expression. This feature is |
||||||
- Add the calling of extract(), extractByIndex(), create() and add() functions |
performed by the method delete(), which uses the optional parameters |
||||||
with variable options rather than fixed arguments. |
PCLZIP_OPT_BY_INDEX, PCLZIP_OPT_BY_NAME, PCLZIP_OPT_BY_EREG or PCLZIP_OPT_BY_PREG. |
||||||
- Add the ability to remove all the file path while extracting or adding, |
- Add the ability to extract by regular expression. To extract by regexp you must use the method |
||||||
without any need to specify the path to remove. |
extract(), with the option PCLZIP_OPT_BY_EREG or PCLZIP_OPT_BY_PREG |
||||||
This is available for extract(), extractByIndex(), create() and add() functionS by using |
(depending if you want to use ereg() or preg_match() syntax) followed by the |
||||||
the new variable options parameters : |
regular expression pattern. |
||||||
- PCLZIP_OPT_REMOVE_ALL_PATH : by indicating this option while calling the fct. |
- Add the ability to extract by index, directly with the extract() method. This is a |
||||||
- Ability to change the mode of a file after the extraction (chmod()). |
code improvment of the extractByIndex() method. |
||||||
This is available for extract() and extractByIndex() functionS by using |
- Add the ability to extract by name. To extract by name you must use the method |
||||||
the new variable options parameters. |
extract(), with the option PCLZIP_OPT_BY_NAME followed by the filename to |
||||||
- PCLZIP_OPT_SET_CHMOD : by setting the value of this option. |
extract or an array of filenames to extract. To extract all a folder, use the folder |
||||||
- Ability to definition call-back options. These call-back will be called during the adding, |
name rather than the filename with a '/' at the end. |
||||||
or the extracting of file (extract(), extractByIndex(), create() and add() functions) : |
- Add the ability to add files without compression. This is done with a new attribute |
||||||
- PCLZIP_CB_PRE_EXTRACT : will be called before each extraction of a file. The user |
which is PCLZIP_OPT_NO_COMPRESSION. |
||||||
can trigerred the change the filename of the extracted file. The user can triggered the |
- Add the attribute PCLZIP_OPT_EXTRACT_AS_STRING, which allow to extract a file directly |
||||||
skip of the extraction. This is adding a 'skipped' status in the file list result value. |
in a string without using any file (or temporary file). |
||||||
- PCLZIP_CB_POST_EXTRACT : will be called after each extraction of a file. |
- Add constant PCLZIP_SEPARATOR for static configuration of filename separators in a single string. |
||||||
Nothing can be triggered from that point. |
The default separator is now a comma (,) and not any more a blank space. |
||||||
- PCLZIP_CB_PRE_ADD : will be called before each add of a file. The user |
THIS BREAK THE BACKWARD COMPATIBILITY : Please check if this may have an impact with |
||||||
can trigerred the change the stored filename of the added file. The user can triggered the |
your script. |
||||||
skip of the add. This is adding a 'skipped' status in the file list result value. |
- Improve algorythm performance by removing the use of temporary files when adding or |
||||||
- PCLZIP_CB_POST_ADD : will be called after each add of a file. |
extracting files in an archive. |
||||||
Nothing can be triggered from that point. |
- Add (correct) detection of empty filename zipping. This can occurs when the removed |
||||||
- Two status are added in the file list returned as function result : skipped & filename_too_long |
path is the same |
||||||
'skipped' is used when a call-back function ask for skipping the file. |
as a zipped dir. The dir is not zipped (['status'] = filtered), only its content. |
||||||
'filename_too_long' is used while adding a file with a too long filename to archive (the file is |
- Add better support for windows paths (thanks for help from manus@manusfreedom.com). |
||||||
not added) |
- Corrected bug : When the archive file already exists with size=0, the add() method |
||||||
- Adding the function PclZipUtilPathInclusion(), that check the inclusion of a path into |
fails. Corrected in 2.0. |
||||||
a directory. |
- Remove the use of OS_WINDOWS constant. Use php_uname() function rather. |
||||||
- Add a check of the presence of the archive file before some actions (like list, ...) |
- Control the order of index ranges in extract by index feature. |
||||||
- Add the initialisation of field "index" in header array. This means that by |
- Change the internal management of folders (better handling of internal flag). |
||||||
default index will be -1 when not explicitly set by the methods. |
|
||||||
|
|
||||||
Version 1.2 : |
Version 1.3 : |
||||||
- Adding a duplicate function. |
- Removing the double include check. This is now done by include_once() and require_once() |
||||||
- Adding a merge function. The merge function is a "quick merge" function, |
PHP directives. |
||||||
it just append the content of an archive at the end of the first one. There |
- Changing the error handling mecanism : Remove the use of an external error library. |
||||||
is no check for duplicate files or more recent files. |
The former PclError...() functions are replaced by internal equivalent methods. |
||||||
- Improve the search of the central directory end. |
By changing the environment variable PCLZIP_ERROR_EXTERNAL you can still use the former library. |
||||||
|
Introducing the use of constants for error codes rather than integer values. This will help |
||||||
Version 1.1.2 : |
in futur improvment. |
||||||
|
Introduction of error handling functions like errorCode(), errorName() and errorInfo(). |
||||||
- Changing the license of PclZip. PclZip is now released under the GNU / LGPL license |
- Remove the deprecated use of calling function with arguments passed by reference. |
||||||
(see License section). |
- Add the calling of extract(), extractByIndex(), create() and add() functions |
||||||
- Adding the optional support of a static temporary directory. You will need to configure |
with variable options rather than fixed arguments. |
||||||
the constant PCLZIP_TEMPORARY_DIR if you want to use this feature. |
- Add the ability to remove all the file path while extracting or adding, |
||||||
- Improving the rename() function. In some cases rename() does not work (different |
without any need to specify the path to remove. |
||||||
Filesystems), so it will be replaced by a copy() + unlink() functions. |
This is available for extract(), extractByIndex(), create() and add() functionS by using |
||||||
|
the new variable options parameters : |
||||||
Version 1.1.1 : |
- PCLZIP_OPT_REMOVE_ALL_PATH : by indicating this option while calling the fct. |
||||||
|
- Ability to change the mode of a file after the extraction (chmod()). |
||||||
- Maintenance release, no new feature. |
This is available for extract() and extractByIndex() functionS by using |
||||||
|
the new variable options parameters. |
||||||
Version 1.1 : |
- PCLZIP_OPT_SET_CHMOD : by setting the value of this option. |
||||||
|
- Ability to definition call-back options. These call-back will be called during the adding, |
||||||
- New method Add() : adding files in the archive |
or the extracting of file (extract(), extractByIndex(), create() and add() functions) : |
||||||
- New method ExtractByIndex() : partial extract of the archive, files are identified by |
- PCLZIP_CB_PRE_EXTRACT : will be called before each extraction of a file. The user |
||||||
their index in the archive |
can trigerred the change the filename of the extracted file. The user can triggered the |
||||||
- New method DeleteByIndex() : delete some files/folder entries from the archive, |
skip of the extraction. This is adding a 'skipped' status in the file list result value. |
||||||
files are identified by their index in the archive. |
- PCLZIP_CB_POST_EXTRACT : will be called after each extraction of a file. |
||||||
- Adding a test of the zlib extension presence. If not present abort the script. |
Nothing can be triggered from that point. |
||||||
|
- PCLZIP_CB_PRE_ADD : will be called before each add of a file. The user |
||||||
Version 1.0.1 : |
can trigerred the change the stored filename of the added file. The user can triggered the |
||||||
|
skip of the add. This is adding a 'skipped' status in the file list result value. |
||||||
- No new feature |
- PCLZIP_CB_POST_ADD : will be called after each add of a file. |
||||||
|
Nothing can be triggered from that point. |
||||||
|
- Two status are added in the file list returned as function result : skipped & filename_too_long |
||||||
3 - Corrected bugs |
'skipped' is used when a call-back function ask for skipping the file. |
||||||
================== |
'filename_too_long' is used while adding a file with a too long filename to archive (the file is |
||||||
|
not added) |
||||||
Corrected in Version 2.0 : |
- Adding the function PclZipUtilPathInclusion(), that check the inclusion of a path into |
||||||
- Corrected : During an extraction, if a call-back fucntion is used and try to skip |
a directory. |
||||||
a file, all the extraction process is stopped. |
- Add a check of the presence of the archive file before some actions (like list, ...) |
||||||
|
- Add the initialisation of field "index" in header array. This means that by |
||||||
Corrected in Version 1.3 : |
default index will be -1 when not explicitly set by the methods. |
||||||
- Corrected : Support of static synopsis for method extract() is broken. |
|
||||||
- Corrected : invalid size of archive content field (0xFF) should be (0xFFFF). |
Version 1.2 : |
||||||
- Corrected : When an extract is done with a remove_path parameter, the entry for |
- Adding a duplicate function. |
||||||
the directory with exactly the same path is not skipped/filtered. |
- Adding a merge function. The merge function is a "quick merge" function, |
||||||
- Corrected : extractByIndex() and deleteByIndex() were not managing index in the |
it just append the content of an archive at the end of the first one. There |
||||||
right way. For example indexes '1,3-5,11' will only extract files 1 and 11. This |
is no check for duplicate files or more recent files. |
||||||
is due to a sort of the index resulting table that puts 11 before 3-5 (sort on |
- Improve the search of the central directory end. |
||||||
string and not interger). The sort is temporarilly removed, this means that |
|
||||||
you must provide a sorted list of index ranges. |
Version 1.1.2 : |
||||||
|
|
||||||
Corrected in Version 1.2 : |
- Changing the license of PclZip. PclZip is now released under the GNU / LGPL license |
||||||
|
(see License section). |
||||||
- Nothing. |
- Adding the optional support of a static temporary directory. You will need to configure |
||||||
|
the constant PCLZIP_TEMPORARY_DIR if you want to use this feature. |
||||||
Corrected in Version 1.1.2 : |
- Improving the rename() function. In some cases rename() does not work (different |
||||||
|
Filesystems), so it will be replaced by a copy() + unlink() functions. |
||||||
- Corrected : Winzip is unable to delete or add new files in a PclZip created archives. |
|
||||||
|
Version 1.1.1 : |
||||||
Corrected in Version 1.1.1 : |
|
||||||
|
- Maintenance release, no new feature. |
||||||
- Corrected : When archived file is not compressed (0% compression), the |
|
||||||
extract method fails. |
Version 1.1 : |
||||||
|
|
||||||
Corrected in Version 1.1 : |
- New method Add() : adding files in the archive |
||||||
|
- New method ExtractByIndex() : partial extract of the archive, files are identified by |
||||||
- Corrected : Adding a complete tree of folder may result in a bad archive |
their index in the archive |
||||||
creation. |
- New method DeleteByIndex() : delete some files/folder entries from the archive, |
||||||
|
files are identified by their index in the archive. |
||||||
Corrected in Version 1.0.1 : |
- Adding a test of the zlib extension presence. If not present abort the script. |
||||||
|
|
||||||
- Corrected : Error while compressing files greater than PCLZIP_READ_BLOCK_SIZE (default=1024). |
Version 1.0.1 : |
||||||
|
|
||||||
|
- No new feature |
||||||
4 - Known bugs or limitations |
|
||||||
============================= |
|
||||||
|
3 - Corrected bugs |
||||||
Please publish bugs reports in SourceForge : |
================== |
||||||
http://sourceforge.net/tracker/?group_id=40254&atid=427564 |
|
||||||
|
Corrected in Version 2.0 : |
||||||
In Version 2.x : |
- Corrected : During an extraction, if a call-back fucntion is used and try to skip |
||||||
- PclZip does only support file uncompressed or compressed with deflate (compression method 8) |
a file, all the extraction process is stopped. |
||||||
- PclZip does not support password protected zip archive |
|
||||||
|
Corrected in Version 1.3 : |
||||||
In Version 1.2 : |
- Corrected : Support of static synopsis for method extract() is broken. |
||||||
|
- Corrected : invalid size of archive content field (0xFF) should be (0xFFFF). |
||||||
- merge() methods does not check for duplicate files or last date of modifications. |
- Corrected : When an extract is done with a remove_path parameter, the entry for |
||||||
|
the directory with exactly the same path is not skipped/filtered. |
||||||
In Version 1.1 : |
- Corrected : extractByIndex() and deleteByIndex() were not managing index in the |
||||||
|
right way. For example indexes '1,3-5,11' will only extract files 1 and 11. This |
||||||
- Limitation : Using 'extract' fields in the file header in the zip archive is not supported. |
is due to a sort of the index resulting table that puts 11 before 3-5 (sort on |
||||||
- WinZip is unable to delete a single file in a PclZip created archive. It is also unable to |
string and not interger). The sort is temporarilly removed, this means that |
||||||
add a file in a PclZip created archive. (Corrected in v.1.2) |
you must provide a sorted list of index ranges. |
||||||
|
|
||||||
In Version 1.0.1 : |
Corrected in Version 1.2 : |
||||||
|
|
||||||
- Adding a complete tree of folder may result in a bad archive |
- Nothing. |
||||||
creation. (Corrected in V.1.1). |
|
||||||
- Path given to methods must be in the unix format (/) and not the Windows format (\). |
Corrected in Version 1.1.2 : |
||||||
Workaround : Use only / directory separators. |
|
||||||
- PclZip is using temporary files that are sometime the name of the file with a .tmp or .gz |
- Corrected : Winzip is unable to delete or add new files in a PclZip created archives. |
||||||
added suffix. Files with these names may already exist and may be overwritten. |
|
||||||
Workaround : none. |
Corrected in Version 1.1.1 : |
||||||
- PclZip does not check if the zlib extension is present. If it is absent, the zip |
|
||||||
file is not created and the lib abort without warning. |
- Corrected : When archived file is not compressed (0% compression), the |
||||||
Workaround : enable the zlib extension on the php install |
extract method fails. |
||||||
|
|
||||||
In Version 1.0 : |
Corrected in Version 1.1 : |
||||||
|
|
||||||
- Error while compressing files greater than PCLZIP_READ_BLOCK_SIZE (default=1024). |
- Corrected : Adding a complete tree of folder may result in a bad archive |
||||||
(Corrected in v.1.0.1) |
creation. |
||||||
- Limitation : Multi-disk zip archive are not supported. |
|
||||||
|
Corrected in Version 1.0.1 : |
||||||
|
|
||||||
5 - License |
- Corrected : Error while compressing files greater than PCLZIP_READ_BLOCK_SIZE (default=1024). |
||||||
=========== |
|
||||||
|
|
||||||
Since version 1.1.2, PclZip Library is released under GNU/LGPL license. |
4 - Known bugs or limitations |
||||||
This library is free, so you can use it at no cost. |
============================= |
||||||
|
|
||||||
HOWEVER, if you release a script, an application, a library or any kind of |
Please publish bugs reports in SourceForge : |
||||||
code using PclZip library (or a part of it), YOU MUST : |
http://sourceforge.net/tracker/?group_id=40254&atid=427564 |
||||||
- Indicate in the documentation (or a readme file), that your work |
|
||||||
uses PclZip Library, and make a reference to the author and the web site |
In Version 2.x : |
||||||
http://www.phpconcept.net |
- PclZip does only support file uncompressed or compressed with deflate (compression method 8) |
||||||
- Gives the ability to the final user to update the PclZip libary. |
- PclZip does not support password protected zip archive |
||||||
|
- Some concern were seen when changing mtime of a file while archiving. |
||||||
I will also appreciate that you send me a mail (vincent@phpconcept.net), just to |
Seems to be linked to Daylight Saving Time (PclTest_changing_mtime). |
||||||
be aware that someone is using PclZip. |
|
||||||
|
In Version 1.2 : |
||||||
For more information about GNU/LGPL license : http://www.gnu.org |
|
||||||
|
- merge() methods does not check for duplicate files or last date of modifications. |
||||||
6 - Warning |
|
||||||
================= |
In Version 1.1 : |
||||||
|
|
||||||
This library and the associated files are non commercial, non professional work. |
- Limitation : Using 'extract' fields in the file header in the zip archive is not supported. |
||||||
It should not have unexpected results. However if any damage is caused by this software |
- WinZip is unable to delete a single file in a PclZip created archive. It is also unable to |
||||||
the author can not be responsible. |
add a file in a PclZip created archive. (Corrected in v.1.2) |
||||||
The use of this software is at the risk of the user. |
|
||||||
|
In Version 1.0.1 : |
||||||
7 - Documentation |
|
||||||
================= |
- Adding a complete tree of folder may result in a bad archive |
||||||
PclZip User Manuel is available in English on PhpConcept : http://www.phpconcept.net/pclzip/man/en/index.php |
creation. (Corrected in V.1.1). |
||||||
A Russian translation was done by Feskov Kuzma : http://php.russofile.ru/ru/authors/unsort/zip/ |
- Path given to methods must be in the unix format (/) and not the Windows format (\). |
||||||
|
Workaround : Use only / directory separators. |
||||||
8 - Author |
- PclZip is using temporary files that are sometime the name of the file with a .tmp or .gz |
||||||
========== |
added suffix. Files with these names may already exist and may be overwritten. |
||||||
|
Workaround : none. |
||||||
This software was written by Vincent Blavet (vincent@phpconcept.net) on its leasure time. |
- PclZip does not check if the zlib extension is present. If it is absent, the zip |
||||||
|
file is not created and the lib abort without warning. |
||||||
9 - Contribute |
Workaround : enable the zlib extension on the php install |
||||||
============== |
|
||||||
If you want to contribute to the development of PclZip, please contact vincent@phpconcept.net. |
In Version 1.0 : |
||||||
If you can help in financing PhpConcept hosting service, please go to |
|
||||||
http://www.phpconcept.net/soutien.php |
- Error while compressing files greater than PCLZIP_READ_BLOCK_SIZE (default=1024). |
||||||
|
(Corrected in v.1.0.1) |
||||||
|
- Limitation : Multi-disk zip archive are not supported. |
||||||
|
|
||||||
|
|
||||||
|
5 - License |
||||||
|
=========== |
||||||
|
|
||||||
|
Since version 1.1.2, PclZip Library is released under GNU/LGPL license. |
||||||
|
This library is free, so you can use it at no cost. |
||||||
|
|
||||||
|
HOWEVER, if you release a script, an application, a library or any kind of |
||||||
|
code using PclZip library (or a part of it), YOU MUST : |
||||||
|
- Indicate in the documentation (or a readme file), that your work |
||||||
|
uses PclZip Library, and make a reference to the author and the web site |
||||||
|
http://www.phpconcept.net |
||||||
|
- Gives the ability to the final user to update the PclZip libary. |
||||||
|
|
||||||
|
I will also appreciate that you send me a mail (vincent@phpconcept.net), just to |
||||||
|
be aware that someone is using PclZip. |
||||||
|
|
||||||
|
For more information about GNU/LGPL license : http://www.gnu.org |
||||||
|
|
||||||
|
6 - Warning |
||||||
|
================= |
||||||
|
|
||||||
|
This library and the associated files are non commercial, non professional work. |
||||||
|
It should not have unexpected results. However if any damage is caused by this software |
||||||
|
the author can not be responsible. |
||||||
|
The use of this software is at the risk of the user. |
||||||
|
|
||||||
|
7 - Documentation |
||||||
|
================= |
||||||
|
PclZip User Manuel is available in English on PhpConcept : http://www.phpconcept.net/pclzip/man/en/index.php |
||||||
|
A Russian translation was done by Feskov Kuzma : http://php.russofile.ru/ru/authors/unsort/zip/ |
||||||
|
|
||||||
|
8 - Author |
||||||
|
========== |
||||||
|
|
||||||
|
This software was written by Vincent Blavet (vincent@phpconcept.net) on its leasure time. |
||||||
|
|
||||||
|
9 - Contribute |
||||||
|
============== |
||||||
|
If you want to contribute to the development of PclZip, please contact vincent@phpconcept.net. |
||||||
|
If you can help in financing PhpConcept hosting service, please go to |
||||||
|
http://www.phpconcept.net/soutien.php |
||||||
|
|||||||
@ -1,39 +0,0 @@ |
|||||||
|
|
||||||
Additional note from the Dokeos company |
|
||||||
December, 2008 |
|
||||||
------------------------------------------------------ |
|
||||||
|
|
||||||
|
|
||||||
Within Dokeos LMS the PclZip 2.6 library has been integrated for providing |
|
||||||
compression and extraction functions for Zip formatted archives. |
|
||||||
|
|
||||||
Also, the file pclzip.lib.php has been upgraded to CVS revision 1.48 |
|
||||||
(http://phpzip.cvs.sourceforge.net/*checkout*/phpzip/pclzip/pclzip.lib.php?revision=1.48) |
|
||||||
in order a known bug to be fixed. See http://www.dokeos.com/forum/viewtopic.php?t=14424 for |
|
||||||
detailed information. |
|
||||||
|
|
||||||
The file pclzip.lib_original.php is the original file from the distribution archive |
|
||||||
of PclZip 2.6. |
|
||||||
|
|
||||||
|
|
||||||
Changes |
|
||||||
------- |
|
||||||
|
|
||||||
Revision 1.48 |
|
||||||
Mon Mar 3 21:57:58 2008 UTC (9 months ago) by vblavet (Vincent Blavet) |
|
||||||
Branch: MAIN |
|
||||||
CVS Tags: HEAD |
|
||||||
Changes since 1.47: +35 -21 lines |
|
||||||
Bug correction : When adding files with full windows path (drive letter) |
|
||||||
PclZip is now working. Before, if the drive letter is not the default |
|
||||||
path, PclZip was not able to add the file. |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Additional changes: gzopen64() - 20090930 |
|
||||||
------------------------------ |
|
||||||
An additional change has been applied to check on the zlib extension by probing |
|
||||||
gzopen64() as well as gzopen() in the PclZip() function. This is due to a |
|
||||||
recent change in the Zlib library, whereby the gzopen() function has been |
|
||||||
updated and moved to gzopen64(). |
|
||||||
This problem has been reported to PhpConcept (editors of PclZip). |
|
||||||
Loading…
Reference in new issue