title: PHP ZipArchive large ExtractTo with folders
body: <p>I'm having an issue with ZipArchive extractTo.</p>
  
  <p>I've a +300Mb ZIP file, with 100 folders and +3k XML files in each. When I start the process, it runs until 20 folders and the inside archives and stops working.</p>
  
  <p>This is my unzip function...</p>
  
  <pre><code>public function unzip_files($zipfile, $parent_folder)
  {
      ini_set('memory_limit', '512M');
      set_time_limit(0);      
  
      $zip = new ZipArchive;
      $res = $zip-&gt;open($zipfile);
  
      if( $res === true )
      {
          if( $zip-&gt;extractTo(HCAT_UPLOADS . $parent_folder) );
          {
              $zip-&gt;close();
  
              print '&lt;strong&gt;'. basename($zipfile) .'&lt;/strong&gt; '. __('unziped correctly', self::$ltd) .'.&lt;br /&gt;';
  
              return true;
          }
          else
          {
              print __('Failed to unzip', self::$ltd) .' &lt;strong&gt;'. basename($zipfile) .'&lt;/strong&gt;.&lt;br /&gt;';
  
              return false;
          }
      }
      else
      {
          print __('Failed to unzip', self::$ltd) .' &lt;strong&gt;'. basename($zipfile) .'&lt;/strong&gt;.&lt;br /&gt;';
  
          return false;
      }
  }
  </code></pre>
  
  <p>How can I unzip all the folders? Any hint? :)</p>
  
  <p>Thanks!<br>
  <strong>R</strong></p>