Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.5

Bug #16461 Error for large file sizes (over 3.5Mb)
Submitted: 2009-07-22 15:46 UTC
From: samudradaka Assigned:
Status: Bogus Package: File_Archive (version 1.5.4)
PHP Version: 5.1.2 OS: linux apache server
Roadmaps: (Not assigned)    
Subscription  


 [2009-07-22 15:46 UTC] samudradaka (Vali Hutchison)
Description: ------------ I am using File_Archive (with Cache_lite) to create zip files of files uploaded to my server (Apache / Ubuntu). The code i'm using works fine for files up to around 3.5Mb but file sizes over that fail. Not sure if this is due to limitations with the package or with my server settings. The server works fine for large HTTP uploads. Test script: --------------- <?php require_once "File/Archive.php"; require_once "Cache/Lite.php"; echo "<p>Begin Zipping File</p>"; $cache = new Cache_Lite(array('cacheDir' => 'tmp')); File_Archive::setOption('cache', $cache); File_Archive::setOption('zipCompressionLevel', 9); $getfiles = array('upload-test.mp3'); $zipfolder = "test.zip"; File_Archive::extract( $src = $getfiles, $dest= $zipfolder //$bufferSize = 100000000000000 ); echo "<p>File Zipped Successfully</p>"; $cache->clean(); ?> Expected result: ---------------- Begin Zipping File File Zipped Successfully Actual result: -------------- Begin Zipping File (script fails for files over 3.5Mb before reaching final echo statement)

Comments

 [2009-07-22 15:52 UTC] samudradaka (Vali Hutchison)
-Summary: file_archive maximum file size +Summary: Error for large file sizes (over 3.5Mb)
 [2009-07-22 19:10 UTC] samudradaka (Vali Hutchison)
Have solved this problem now. Had to increase the memory_limit value in the php.ini config file to be at least as big as the file to be compressed. File_Archive must use server RAM to store the data while writing to the zip file.
 [2009-07-22 19:11 UTC] samudradaka (Vali Hutchison)
-Status: Open +Status: Closed -Assigned To: +Assigned To: samudradaka
 [2009-07-22 19:12 UTC] ashnazg (Chuck Burgess)
-Status: Closed +Status: Open
I believe this will end up being the memory_limit setting in php.ini being too low to accommodate the larger zip file build. Unless we want to add a memory usage check and comparison to memory_limit, that is constantly being looped over during the archive build, I'd guess this bug will be Bogus'd.
 [2010-09-06 19:01 UTC] doconnor (Daniel O'Connor)
-Status: Open +Status: Bogus
As per submitter's comments