title: php zip archive memory, ram and max file size
body: <p>I have folders that have user generated images that get rather large. When trying to zip these I am getting errors around 1.5 gig sized zip files. </p>
  
  <p>My questions have to do with memory and I think that php is holding both the zip open and all the images in memory. A possible solution I have is to send each image on upload to the zip file in addition to the appropriate folder, this seems to work so far but what are the limits of the zip file size, from what I can find around 4 gb. How does this affect/interact with the amount of ram on the server?\ and is the limit actually 4gb or can I continue to add files to the zip indefinitely or should I have the script check the size of the zip and if it's over X gigs rename it and create a new zip. I have searched google and read the documentation but have found conflicting information or incomplete info so I'm looking for some definitive answers and advice. Thanks</p>