Solved

Add password on Zip via PHP

Posted on 2008-06-16
7
420 Views
Last Modified: 2012-06-27
i tried this suggestion: http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_22848474.html

But, it didn't worked. What should i try :/
0
Comment
Question by:springfresh
[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
  • 4
  • 3
7 Comments
 
LVL 48

Expert Comment

by:hernst42
ID: 21800383
what does not work with that solution?
which OS is the webserver running?
0
 

Author Comment

by:springfresh
ID: 21800393
i am running on windows. I i am installed WAMP server on windows VISTA
0
 
LVL 48

Expert Comment

by:hernst42
ID: 21800416
zip must be in the PATH and the webserver must be able to write to the directory where WAMP is running.
Check your permissions and pathes.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:springfresh
ID: 21800469
well, i am doing like that:
And it creates .zip file, but do not add password :/
$zip = new ZipArchive();
$filename = $username.'-'.$date.'-'.$random.'.zip';
 
if ($zip->open($filename, ZIPARCHIVE::CREATE)!==TRUE) {
}
 
$zip->addFromString($date."-textfile.txt", "Works!\n");
echo system('zip -P bla '.$filename);
$zip->close();

Open in new window

0
 

Author Comment

by:springfresh
ID: 21800641
hm, aha i see now, that i need zip.exe in that dir. But where can i download free version. I tried from http://www.info-zip.org/Zip.html#Win32 . But i dont know which one should i download. I am using windows Vista
0
 
LVL 48

Accepted Solution

by:
hernst42 earned 500 total points
ID: 21801008
don't know a about a free version. I use seven zip, but can't find the link
0
 

Author Closing Comment

by:springfresh
ID: 31467869
thanks, worked!
0

Featured Post

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

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.
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.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
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 …

726 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