[GH-ISSUE #645] Zip Compressing multiple files does not work #458

Open
opened 2026-03-02 15:58:55 +03:00 by kerem · 3 comments
Owner

Originally created by @luisalvarado on GitHub (Oct 15, 2021).
Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/645

Tried to compress 8 files and it failed (Total file size was 2 MB). Tried to compress one and it failed too. The context menu would also be a great idea where you right click a file or a group of selected files and it shows you the option to compress.

Originally created by @luisalvarado on GitHub (Oct 15, 2021). Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/645 Tried to compress 8 files and it failed (Total file size was 2 MB). Tried to compress one and it failed too. The context menu would also be a great idea where you right click a file or a group of selected files and it shows you the option to compress.
Author
Owner

@sharon846 commented on GitHub (Nov 20, 2021):

I don’t know if it is related, but since the update to php 8.0, zip compression method via php has changed, check it out :)

<!-- gh-comment-id:974725809 --> @sharon846 commented on GitHub (Nov 20, 2021): I don’t know if it is related, but since the update to php 8.0, zip compression method via php has changed, check it out :)
Author
Owner

@michael-milette commented on GitHub (Feb 13, 2022):

@luisalvarado,

Here are a few things you can check:

  1. Does your webserver have write permission to the directory in which the files are located?
  2. As your file is pretty small, this might not be it but How long does it take before it fails? If it is more than 30 seconds, you may need to increase the PHP timeout in your php.ini file. Alternatively, @prasathmani might want to consider increasing the timeout programmatically.
  3. What are the names of the files you are trying to ZIP and what is the name of the directory in which they are located? The files may include characters that ZIP does not support. Try renaming your files if they contain anything but letters a-z. Does this happen with *.txt files?

@srworkspace

The ZIP feature will not work for you. The function zip_open() is deprecated in PHP 8.x in favor of the Object API, see ZipArchive::open().

@prasathmani , this and all references to zip_* functions will need to be fixed in order to make this feature PHP 8 compatible. Fortunately, the solution is backward compatible to PHP 5.2:
https://github.com/prasathmani/tinyfilemanager/blob/master/tinyfilemanager.php#L2599

Best regards,

Michael Milette

<!-- gh-comment-id:1037607172 --> @michael-milette commented on GitHub (Feb 13, 2022): @luisalvarado, Here are a few things you can check: 1. Does your webserver have _write_ permission to the directory in which the files are located? 2. As your file is pretty small, this might not be it but How long does it take before it fails? If it is more than 30 seconds, you may need to increase the PHP timeout in your php.ini file. Alternatively, @prasathmani might want to consider increasing the timeout programmatically. 3. What are the names of the files you are trying to ZIP and what is the name of the directory in which they are located? The files may include characters that ZIP does not support. Try renaming your files if they contain anything but letters a-z. Does this happen with *.txt files? @srworkspace The ZIP feature will not work for you. The function zip_open() is deprecated in PHP 8.x in favor of the Object API, see [ZipArchive::open()](https://www.php.net/manual/en/ziparchive.open.php). @prasathmani , this and all references to zip_* functions will need to be fixed in order to make this feature PHP 8 compatible. Fortunately, the solution is backward compatible to PHP 5.2: https://github.com/prasathmani/tinyfilemanager/blob/master/tinyfilemanager.php#L2599 Best regards, Michael Milette
Author
Owner

@luisalvarado commented on GitHub (Feb 13, 2022):

  1. Yes. For folder, parent folder and files. Full 0777 permission even.
  2. No. It is less than 5 seconds.
  3. Clean standardized names like photo.zip and inside photo01.jpg all the way till photo10.jpg for example.

It is nothing related to the system since it was the first thing developers check.

<!-- gh-comment-id:1037694670 --> @luisalvarado commented on GitHub (Feb 13, 2022): 1. Yes. For folder, parent folder and files. Full 0777 permission even. 2. No. It is less than 5 seconds. 3. Clean standardized names like photo.zip and inside photo01.jpg all the way till photo10.jpg for example. It is nothing related to the system since it was the first thing developers check.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tinyfilemanager#458
No description provided.