I have one application that upload some files and then I can compress as zip file and download.
The export action:
public function exportAction() {
solved:
$zip->close(); header('Content-Type', 'application/zip'); header('Content-disposition: attachment; filename="' . $zipName . '"'); header('Content-Length: ' . filesize($zipName)); readfile($zipName);
apparently closing the file is important ;)