Solved

archive_tar - can not open with winzip

Posted on 2007-03-21
4
222 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
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…
The viewer will learn how to dynamically set the form action using jQuery.

896 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

13 Experts available now in Live!

Get 1:1 Help Now