Zip and Windows Servers (HOW TO)

atlantis

Joined: 2003-07-03
Posts: 12
Posted: Thu, 2003-07-03 21:27

Here is how to get ZipInfo to work with Windows servers:

1. Download Info-ZIP's UnZip from:
http://www.info-zip.org/pub/infozip/UnZip.html#Win32
The actual file I downloaded was named "unz542xN.exe".

2. Create a folder named "Info-Zip" on your C:\ drive.

3. Move the unz542xN.exe file you downloaded to C:\Info-Zip.

4. Run unz542xN.exe from the C:\Info-Zip folder. This will extract 16 files. After successful extraction, you may delete the unz542xN.exe file you moved to the C:\Info-Zip folder.

5. Edit the "save_photos.php" file located in your main Gallery folder.
Search for a line containing the follow string (include the double quotes in your search):
" -1 " .
I found the string on line 263 of my save_photos.php file (v 1.3.3)

6. Change the string to read as follows (All you are doing is adding an UPPERCASE Z in front of the number 1):
" -Z1 " .
This change is because Info-Zip incorporated the zipinfo.exe application into the unzip.exe application. You must use the -Z switch to use zipinfo from within unzip.

7. Save the save_photos.php file.

8. Run the Gallery configuration script (i.e. /gallery/setup/index.php). Note, you may need to run configure.bat first.

9. Set the Zipinfo parameter to:
c:/info-zip/unzip.exe

10. Set the Unzip parameter to:
c:/info-zip/unzip.exe

11. Save your configuration. Note, you may want to run secure.bat now.

12. Test a zip upload!

----

Gallery version: 1.3.3
Web Server: Microsoft IIS
IIS version: 5.0
PHP version: 4.3.1
Graphics Toolkit: ImageMagick 5.5.6 Q16
Operating system: Windows 2000 Server
Web browser/version (if applicable): IE 6.0 SP1

 
atlantis

Joined: 2003-07-03
Posts: 12
Posted: Mon, 2003-07-21 18:55

I recently upgraded to Gallery 1.3.4 and had to make some new changes for the zip functions to work as follows:

1. Edit gallery_remote.php.
Change line 176
FROM: " -1 " .
TO: " -Z1 " .

2. Edit gallery_remote2.php
Change line 385
FROM: " -1 " .
TO: " -Z1 " .

3. Edit util.php.
Change line 1411
FROM: " -1 " .
TO: " -Z1 " .

I also found out that either Info-Zip or Gallery does not like filenames containing a space in the zip archive. If you get an error that says "caution: filename not matched: ... Error: Archive: C:/PHP/uploadtemp/php2E.tmp" then check your zip archive for files containing a space in their filenames.

 
atlantis

Joined: 2003-07-03
Posts: 12
Posted: Tue, 2003-09-23 01:22

I recently upgraded to Gallery 1.4 pl1 and had to make some new changes for the zip functions to work as follows:

1. Edit gallery_remote.php.
Change line 178
FROM: " -1 " .
TO: " -Z1 " .

2. Edit gallery_remote2.php
Change line 416
FROM: " -1 " .
TO: " -Z1 " .

3. Edit util.php.
Change line 1542
FROM: " -1 " .
TO: " -Z1 " .

 
mrgreat
mrgreat's picture

Joined: 2003-11-29
Posts: 6
Posted: Sat, 2003-11-29 05:57

I just installed Gallery 1.4.1 on a Windows 2003 server running IIS 6.0, and this did the trick to get zip file uploading to work!

Thanks atlantis!

Can someone please add this to the FAQ and documentation pages??

 
atlantis

Joined: 2003-07-03
Posts: 12
Posted: Sat, 2003-11-29 06:12

Glad to help! Have fun with Gallery. It is a great application.

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Sat, 2003-11-29 08:37

atlantis, could you add a note to the docs at http://gallery.sf.net/docs.php - in the apropriate section? :)

 
Zero3ffect

Joined: 2003-12-12
Posts: 4
Posted: Mon, 2003-12-15 08:44

After I set the paths for it in the config it tells me "Error: zipinfo: c:/info-zip/unzip.exe must be an executable file!" hmm that sure looks like an executable file to me...

and I couldn't find any line in save_photos.php so I'm guessing that took it out in the newer versions

 
beckett
beckett's picture

Joined: 2002-08-16
Posts: 3473
Posted: Wed, 2003-12-17 13:54

ZipInfo needs to be called zipinfo.exe. Just copy unzip.exe and rename it.

Remember... it's also entirely optional so if it's still not working, you'll probably manage okay w/o.

-Beckett (

)

 
Zero3ffect

Joined: 2003-12-12
Posts: 4
Posted: Thu, 2004-01-22 23:09

yea still no luck with it... they both say they must be an executable... oh well