Php – $_FILES array empty in php when uploading .zip, while .jpg works fine

phpuploadzip

I am running php 5.3, and have bumped into a problem I've not encountered before. I have an upload form (yes, enctype is set to multipart/form-data), that posts stuff to a php page.

The php installation has uploads enabled, and upload_max_filesize is set to .5GB.

Uploading pictures (I've tried up to 50 at a time) works fine. Uploading .zip files, however, does not. Uploading a .zip will render most global input arrays ($_POST,$_GET,$_FILES, and $_REQUEST) completely empty. A network sniff shows POST data beeing sent, as well as the zip beeing uploaded.

Apache logs show nothing out of the ordinary, and no errors are encountered. The arrays are just empty. Has anyone encountered this?

Best Solution

I don't have a clue what the exact problem could be, but I'd suggest trying out a few modifications on the files:

  • can you upload a .jpg file that you've renamed to .zip?
  • can you upload a .zip file that you've renamed to .jpg?
  • try uploading a smaller .zip file, just to make sure it does actually get transfered.
  • try uploading a .jpg with a bigger filesize

Hopefully this will give a pointer about where the problem lies. For what it is worth, I doubt that the problem is in PHP.

Related Question