Add password on Zip via PHP

i tried this suggestion:

But, it didn't worked. What should i try :/
Who is Participating?
hernst42Connect With a Mentor Commented:
don't know a about a free version. I use seven zip, but can't find the link
what does not work with that solution?
which OS is the webserver running?
springfreshAuthor Commented:
i am running on windows. I i am installed WAMP server on windows VISTA
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

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.
springfreshAuthor Commented:
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);

Open in new window

springfreshAuthor Commented:
hm, aha i see now, that i need zip.exe in that dir. But where can i download free version. I tried from . But i dont know which one should i download. I am using windows Vista
springfreshAuthor Commented:
thanks, worked!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.