PHP Classes

Allowed memory size to allocate

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in

      dUnzip2  >  All threads  >  Allowed memory size to allocate  >  (Un) Subscribe thread alerts  
Subject:Allowed memory size to allocate
Summary:Problem with unzip the file, becouse of memory limit to allocate
Date:2009-12-28 13:17:47
Update:2011-12-12 16:25:59

  1. Allowed memory size to allocate   Reply   Report abuse  
Picture of Michal Michal - 2009-12-28 13:17:47
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:
require_once dirname(__FILE__)."/classes/";

$data = implode(file(""));

if($fh = fopen('', 'w+')){
fputs($fh, $data);

$zip = new dUnzip2('');


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/ on line 310

  2. Re: Allowed memory size to allocate   Reply   Report abuse  
Picture of Koroush Raoufi Koroush Raoufi - 2011-12-12 16:26:00 - In reply to message 1 from Michal
I found a way
if ini_set is not limited on your web server
you can use
this before run unzip class