Login   Register  
PHP Classes
elePHPant
Icontem

zip large files problem

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      Create ZIP File  >  All threads  >  zip large files problem  >  (Un) Subscribe thread alerts  
Subject:zip large files problem
Summary:zip large files problem
Messages:2
Author:destrutorx
Date:2009-06-15 22:08:22
Update:2009-06-16 06:35:35
 

  1. zip large files problem   Reply   Report abuse  
Picture of destrutorx
destrutorx
2009-06-15 22:08:22
Hi. Congratulations for your class. Its very useful.

I used it but found a problem. I can't download the zip file generated if it's bigger than 2MB. The file came corrupted. I tried resolve this problem without success.

Can You Help me?

  2. Re: zip large files problem   Reply   Report abuse  
Picture of Er. Rochak Chauhan
Er. Rochak Chauhan
2009-06-16 06:35:35 - In reply to message 1 from destrutorx
First of all thank you for the appreciation.

The problem you are facing is a very common. The solutions is two fold.

1) Increase the "memory_limit" in your PHP.ini

2) Alternatively, need to read file bit by bit and write as a zip file, rather than reading the complete file(s) in the memory and then writing it as a zip file. Hence, not using up the allocated memory.