• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Zip library - Large file processing


I am trying to create a zip file of various images. This works fine when there are a few images (size wise) but when the size of the total images exceeds a certain amount I get "Memory Allocation" errors. I am aware I can increase the server memory limit, but I am looking for a solution that does not require this.

Perhaps there is a way to split the files into multiple zip files and download them?


$cat_name = $this->project_model->get_name();
$zipname = $cat_name->name;
$zipname = $zipname . '.zip';        

$path = 'images/';
$images = $this->project_model->get_gallery();
foreach($images as $row){
    $files = $path.$row['img_name'];

Any ideas? Thank you  Smile

I found this read down and see the function/method type ZipFly()

Creating Large zip files in php

Hope this helps.
What did you Try? What did you Get? What did you Expect?

Joined the CodeIgniter Community in 2009.          ( Skype: insitfx )

Thank you, will take a look and see if it helps.

I'm not sure about the 'zip' thing, but when I had issues uploading large files, could be zips or different formats, I found plupload did the trick (you can browse the source on github), essentially it uses chunked uploads to get around the memory limitation issue you get when dealing with large file/uploads.

It might be worth a look at....

Also, I'd just like to add PHP isn't great for these kind of tasks, it is something you'd want to do with something like nodejs which supports non blocking IO...

Good info found here.
IgnitedCMS Pro
Practical guide to IgnitedCMS - Book coming soon

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

Users browsing this thread:
1 Guest(s)

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2018 MyBB Group.