I am currently storing lots of photos in a zip archive on a LAMP server. When a new user gets added to my program I open the zip archive and add their photo.
The problem is when the zip archive approaches 50MB the function ZipArchive::open always returns the error number 5, which I believe is this error ZIPARCHIVE::ER_READ
Does any one have a clue why this would happen?
Many thanks,
Theo.
In the end I stopped using the ZipArchive class and zipped the files up on the command line using the php exec command http://php.net/manual/en/function.exec.php
exec('tar -cvf file.tar myfile.txt');
Try increasing php's memory_limit
. It's possible it's running out of memory when loading a larger .zip file.
Also try to increase max_execution_time
.