Solved

archive_tar - can not open with winzip

Posted on 2007-03-21
4
230 Views
Last Modified: 2007-03-21
After creating a zip-file with archive_tar, i can open the file with winrar but not with winzip. The file is create on a linux server with following function:

function zipme($folder,$tarname,$files){
      require("tar.php");
      $tar = new Archive_Tar($tarname,"zip");
      if(!$tar->createModify($files,"","$folder"))return false;
      return true;
}

here are the parameters:
$folder = "xmlfolder/client/"
$tarname = "client_data.zip"
$files = array("xmlfolder/client/customer.xml","xmlfolder/client/products.xml")

what is going wrong? I can download the file but it is invalid when i open it with winzip.
0
Comment
Question by:secuteamers
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 48

Accepted Solution

by:
hernst42 earned 500 total points
ID: 18763186
Can you open the zip correctly if you rename it localy from .zip to .tar?
Which tar.php doe you use own programmed or the one from PEAR?
0
 

Author Comment

by:secuteamers
ID: 18763764
How can i make it a zip-file with extension 'zip'?
0
 
LVL 48

Expert Comment

by:hernst42
ID: 18764037
There are various php-programs to do this. See
http://de3.php.net/zip
http://pear.php.net/package/File_Archive
0
 

Author Comment

by:secuteamers
ID: 18764162
thx,
works fine
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses four methods for overlaying images in a container on a web page
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question