Possible Duplicate:
Dynamically created zip files by ZipStream in PHP won't open in OSX
I'm using PHP ZipArchive to allow website users to combine a few files into a zip file, and then download them. It works perfectly on the Fedora linux computer I'm running it on. But if I download the files using my Mac laptop the files will not unzip, double clicking creates a cpgz file. Double clicking the cpgz file creates another cpgz, etc etc.
Going by a google search the zip-cpgz loop looks like it is a pretty common problem, but almost all the solutions suggest that the original file was poorly formatted; a zip of a non-existant initial file, a zip produced by a windows machine with a different file ending, things like that. I don't think that's the case with mine because it works fine on my Linux machine.
Opening the zip file in the terminal using unzip works, though gives the warning
warning [filename.zip]: 3 extra bytes at beginning or within zipfile (attempting to process anyway)
I would prefer not to tell users to use the terminal though, if I can avoid it.
Here's a link to one of the files, I can't provide a link to the website I'm operating, it's not up and running yet. The file should contain 8 ascii files (they're surface temperatures for a site on the surface of Mars).
http://eddybarratt.co.uk/wp-content/uploads/2012/06/files_run0000008.zip