Solved

Add password on Zip via PHP

Posted on 2008-06-16
7
386 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
  • 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
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.

 

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

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

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
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 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 …

912 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

18 Experts available now in Live!

Get 1:1 Help Now