?
Solved

Add password on Zip via PHP

Posted on 2008-06-16
7
Medium Priority
?
427 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
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

 

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 2000 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

Independent Software Vendors: 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!

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
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 look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

752 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