Solved

archive_tar - can not open with winzip

Posted on 2007-03-21
4
209 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
  • 2
  • 2
4 Comments
 
LVL 48

Accepted Solution

by:
hernst42 earned 500 total points
Comment Utility
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
Comment Utility
How can i make it a zip-file with extension 'zip'?
0
 
LVL 48

Expert Comment

by:hernst42
Comment Utility
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
Comment Utility
thx,
works fine
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Introduction Many web sites contain image galleries; a common design for these galleries includes a page with a collection of thumbnail images.  You can click on each of the thumbnail images to see the larger version of the image.  This is easily i…
This article discusses how to create an extensible mechanism for linked drop downs.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now