
 Michal - 2009-12-28 13:17:47
Hi, 
 On my server I need to uncompress file which is exported part of database from other server. Zipped file is 10mb, inside is only one file more than 500mb. 
My code:
<code>
  <?php
	require_once dirname(__FILE__)."/classes/dUnzip2.inc.php";
	
	$data = implode(file("http://www.xxx.pl/offer.php?cmd=trips_z&username=user&password=pass&format=gzip"));
	
	if($fh = fopen('trip_brazil.zip', 'w+')){
		fputs($fh, $data);
		fclose($fh);
	}
	
	$zip = new dUnzip2('trip_brazil.zip');
	$zip->unzipAll();
?>
</code>
The problem is memory limit to allocate.
Here is the error message:
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 543881838 bytes) in /home/studiomi/public_html/eximoferta/classes/dUnzip2.inc.php on line 310