Thanks for the reply
Interesting... I hadn't thought of that --
I'm on a unix box --
The only thing is, the way the script needs to work is that it inserts each pdf into a blob and does not use the filesystem at all -- the zip file is also uploaded thru a form. I've been doing it like mentioned in above code for testing porposes to try and pinpoint the problem.
But I suppose I could unzip it into a temp dir with exec() and then go through each file, insert it to the db, and then delete.
One other thing::
On one of the pdfs in the zip, the filesize of the uncorrupted version is 43787. The filesize of the corrupted one that zziplib (or maybe my save_zip function?) produces is 49152. When I add ini_set("magic_quotes_runtime", 0), the filesize goes down to 45056, but it is still corrupted.
What is the best and proper way to ensure that zziplib is extracting and then saving the files w/o adding any additional stuff?
If I add a stripslashes() onto the save_zip around $data, the server spins forever and no errors are thrown. This is weird!!!