arrays - ZipArchive Limits? PHP


I have a ZipArchive script used for a 'download basket' feature on my site. Users pick the audio they'd like to add to the basket, then the script authenticates the user and grabs all the secured files and adds them to the zip ready for download.

Once the zip is downloaded the code then deletes the file. That's all working well, however I'm running into a problem regarding bigger files! If users want to zip tracks that total over 250mb, the temp zip file that get's written never gets larger than 250mb - it just gets overwritten and starts again.

My two questions would then be:

  1. Does ZipArchive have a limit to files being written?
  2. Does ZipArchive have a different way of writing the files to make bigger files?

Appreciate your help.




A limit of ZIP file is 4 GB of compressed file. For larger of 4 GB you need split it separely.

But it can depends on memory_limit() if you on-the-fly ZIP it will be on lower capacity.

Does ZipArchive have a different way of writing the files to make bigger files?

No. But you can split your archiver if you want and later join on extracting as string.

People are also looking for solutions to the problem: php - Pseudo-Apriori Algorithm


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.