Solved

archive_tar - can not open with winzip

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
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…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

809 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