drewdall Posted May 13, 2010 Share Posted May 13, 2010 Hello All, I've developed a script (using ZipArchive, calling addFile etc) to create a zip file on my little Windows server running xampp. Everything fine, I get a file called harry.zip, albeit a largish 130MB. But when I port the script to a linux (debian 5.2.6) machine, and use it to generate a zip from exactly the same set of files, the script produces 2 files, of the form harry.zip.XXXXXX, where XXXXXX is a seemingly random set of six alphanumerics. Both files are over 100MB each! When I download these file to my Windows pc, 7Zip is unable to read them. Why are 2 files produced, and why the funny extension? What am I doing wrong, and can anybody tell me how to do it right, so that on linux I end up with a single zip? Thank you for your time and attention. Regards. Quote Link to comment Share on other sites More sharing options...
drewdall Posted May 13, 2010 Author Share Posted May 13, 2010 Just been reading up a bit more and found out about ZipArchive::addFile() bug which imposes a limit on the number of files you can add to an archive, the workaround being to close/reopen the archive to continue adding more files, which I now do every 100 files and it's fixed it, inasmuch as I now get a complete, single zip file. The only remaining issue is that the process leaves one of those intermediate harry.zip.XXXXXX files hanging around, but I guess I can live with that. Cheers! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.