Solved

Add password on Zip via PHP

Posted on 2008-06-16
7
377 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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Consider the following scenario: You are working on a website and make something great - something that lets the server work with information submitted by your users. This could be anything, from a simple guestbook to a e-Money solution. But what…
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…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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.

762 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

19 Experts available now in Live!

Get 1:1 Help Now