Past few hours under the bridge and the zip creation code I'm working with will only create the zip if I run it from a ssh terminal using the php command as in: php zipcreate.php So I know the code works. I'm running this on a ubuntu debian amazon ec2 server. All the relevant files are owned by user ubuntu, the user I'm logged in as when I execute the script manually. It will not work for the life of my when I execute the script from the browser via the sites url. The page loads but no zip.
I've even changed the following lines in etc/apache2/envvars to user ubuntu with no success. export APACHE_RUN_USER=www-data export APACHE_RUN_GROUP=www-data
What in the world am I missing. I'm pretty sure I'm not duplicating a question on stack overflow since I've read them all by now.
BTW, here's the zip code just in case: $files = array('test.txt'); $zipname = 'file.zip'; $zip = new ZipArchive; $zip->open($zipname, ZipArchive::CREATE); foreach ($files as $file) { $zip->addFile($file); } $zip->close();