Noch mal zip

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • Noch mal zip

    Hallo,

    ich habe nochmal ein Problem zum Thema unzip & zip-file's.

    Wenn ich mit der Windows XP internen Funktion eine zip erstelle dann funktioniert das Entpacken wunderbar (siehe bsp.1).
    Doch wenn ich eine Zip-Datei mit WinRAR erstelle, weigert sich die Funktion die Zip-Datei zuentpacken.

    Beispiel 1:
    PHP-Code:
    $homepath "/srv/www/htdocs/web1/html/2k5/";
    $dir "gallery/partypics/23/";
    $file "13_01_05_halli.zip";

    /** Unzip the file -> start **/
    /**/ 
    $command '/usr/bin/unzip -j '.$homepath.$dir.$file.'" -d '.$homepath.$dir.'" 2>&1';
    /**/ $unzip shell_exec($command);
    /**/ if (DEBUG==true) {
    /**/     $status .= $this->debug->debug_shell_exec($unzip,$command,"unzip",$dir);
    /**/ }
    /** Unzip the file -> end **/ 


    Fehler Meldung:

    Aufruf:
    $unzip = shell_exec('/usr/bin/unzip -j "/srv/www/htdocs/web1/html/2k5/gallery/partypics/23/13_01_05_halli.zip" -d "/srv/www/htdocs/web1/html/2k5/gallery/partypics/23" 2>&1');

    Ausgabe von $unzip:
    Archive: /srv/www/htdocs/web1/html/2k5/gallery/partypics/23/13_01_05_halli.zip
    End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive.

    note: /srv/www/htdocs/web1/html/2k5/gallery/partypics/23/13_01_05_halli.zip may be a plain executable, not an archive
    unzip: cannot find zipfile directory in one of /srv/www/htdocs/web1/html/2k5/gallery/partypics/23/13_01_05_halli.zip or
    /srv/www/htdocs/web1/html/2k5/gallery/partypics/23/13_01_05_halli.zip.zip, and cannot find /srv/www/htdocs/web1/html/2k5/gallery/partypics/23/13_01_05_halli.zip.ZIP, period.

    Hab schon gegoogelt, aber da steht was von defektem Archiv, kann nicht sein, weil wenn ich die Datei wieder download, kann ich sie ganz normal öffnen.
    Zuletzt geändert von Skaschy; 02.06.2005, 06:20.

  • #2
    Mhh weiss echt keiner weiter?

    Kommentar


    • #3
      Hi!

      Bei der Arbeit mit der PHP Funktion zip_open ist mir aufgefallen, das mit winrar erstellte .zip Archive auch nicht verarbeitet konnten.

      Das lag daran, das winrar zip's als filetype: application/octet-stream
      erkannt werden.


      Evtl liegt es auch bei Dir an diesem Problem, das die von Dir verwendete shell Funktion unzip nur Dateien von Typ application/x-zip-compressed (z.B. für eine mit Winzip erstellte Datei)
      akzeptiert.

      Vielleicht hilft Dir das weiter.
      Bis ich das bei mir herausgeforscht hatte...

      Gruß Martin

      Kommentar

      Lädt...
      X