<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">What are you using to set the $file
      variable? It needs to be a path to the local file system. What you
      got is a URL. You want something more along the lines of
      /sites/samplesite.com/files/testjan.zip<br>
      <pre class="moz-signature" cols="72">Jamie Holly
<a class="moz-txt-link-freetext" href="http://hollyit.net">http://hollyit.net</a></pre>
      On 1/27/2014 9:54 PM, Swatee Karpe wrote:<br>
    </div>
    <blockquote
cite="mid:CA+DP+qS83oUjZ5Cp6bBCWMpigqGqjPY4zbA0GuZuwXSd_Fs07g@mail.gmail.com"
      type="cite">
      <div dir="ltr">Thanks for replying Jamie.
        <div><br>
        </div>
        <div>I tried to use&nbsp;$archiver = archiver_get_archiver($file);</div>
        <div><br>
        </div>
        <div>It shows&nbsp;<em class="">Exception</em>: Archivers can only
          operate on local files: &lt;em class="placeholder"&gt;<a
            moz-do-not-send="true"
            href="http://samplesite.com/sites/samplesite.com/files/testjan.zip">http://samplesite.com/sites/samplesite.com/files/testjan.zip</a>&lt;/em&gt;

          not supported in <em class="">archiver_get_archiver()</em>
          (line <em class="">8091</em> of <em class="">/sites/drupal7/includes/common.inc</em>).</div>
        <div>Error to me.</div>
        <div><br>
        </div>
        <div>Any solution on this?</div>
        <div><br>
        </div>
        <div>do u have sample code for this?<br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Mon, Jan 27, 2014 at 10:02 PM, Jamie
          Holly <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:hovercrafter@earthlink.net" target="_blank">hovercrafter@earthlink.net</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div text="#000000" bgcolor="#FFFFFF">
              <div>If you're using Drupal 7, it would be better to use
                the built in archiver class. It's used in
                update_manager_archive_extract in
                modules/update/update.manager.inc:<br>
                <br>
                <a moz-do-not-send="true"
href="https://api.drupal.org/api/drupal/modules%21update%21update.manager.inc/function/update_manager_archive_extract/7"
                  target="_blank">https://api.drupal.org/api/drupal/modules%21update%21update.manager.inc/function/update_manager_archive_extract/7</a><span
                  class="HOEnZb"><font color="#888888"><br>
                    <br>
                    <br>
                    <pre cols="72">Jamie Holly
<a moz-do-not-send="true" href="http://hollyit.net" target="_blank">http://hollyit.net</a></pre>
                  </font></span>
                <div>
                  <div class="h5"> On 1/27/2014 2:20 AM, Swatee Karpe
                    wrote:<br>
                  </div>
                </div>
              </div>
              <div>
                <div class="h5">
                  <blockquote type="cite">
                    <div dir="ltr">Hi all,
                      <div><br>
                      </div>
                      <div>I am using drupal 7 and I want extract the
                        zip file and save the extracted folder into
                        files directory. I am taking zip file from one
                        of my content type.</div>
                      <div><br>
                      </div>
                      <div>For this I am trying to use ZipArchive
                        class.&nbsp;</div>
                      <pre><span style="font-family:arial">&nbsp;$zip = new ZipArchive;</span>
</pre>
                      <div>
                        <div>&nbsp;$unzip = $zip-&gt;open($filename);</div>
                        <div><br>
                        </div>
                        <div>
                          <pre>ZipArchive Object
(
    [status] =&gt; 0
    [statusSys] =&gt; 0
    [numFiles] =&gt; 0
    [filename] =&gt; 
    [comment] =&gt; &nbsp;</pre>
                          <div>)</div>
                        </div>
                        <div><br>
                        </div>
                        <div>After printing $zip i get the empty array
                          as above.<br>
                        </div>
                        <div><br>
                        </div>
                        <div>Do any one know why this is not working in
                          my case?</div>
                        <div>Or any one know other way to extract file
                          and save it to folder.</div>
                        <div><br>
                        </div>
                        <div>Thanks in advance.</div>
                        <div>--</div>
                        <div dir="ltr">Swatee Amit Karpe<br>
                          <br>
                        </div>
                      </div>
                    </div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                  </blockquote>
                  <br>
                </div>
              </div>
            </div>
            <br>
            --<br>
            [ Drupal support list | <a moz-do-not-send="true"
              href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a>
            ]<br>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div dir="ltr">Thanks &amp; Regards,<br>
          Swatee Amit Karpe<br>
          <br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
    </blockquote>
    <br>
  </body>
</html>