Zip upload problem-Can /tmp dir path be changed? Debug info.

athertop

Joined: 2003-08-06
Posts: 38
Posted: Wed, 2003-08-06 11:08

I am getting an error when trying to upload Zip files. I would appreciate any help as I have almost hit a stop with this. I have seen an identical problem reported in the following post, but the fix here didn't work for me:
http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=5876

Individual files upload no problem, it's just zips I get the problem with.

I have:
Gallery: v1.3.4 pl1 Running inside Geeklog v1.3.8
Unzip/Zipinfo: 5.5
o/s: Linux Infong v2.4.20 (infong version customised by oneandone.com host provider)
php: v4.2.3
Apache: v1.3.28

In debug mode, I get the following when trying to upload a zip file:

**********Begin*************

Executing:

/homepages/19/d42267495/htdocs/bin/unzip/zipinfo -Z -1 /tmp/php1rS8O4

Results:
UnZip 5.50 of 17 February 2002, by Info-ZIP. Maintained by C. Spieler. Send
bug reports to the authors at

; see README for details.

Usage: unzip [-Z] [-opts[modifiers]] file[.zip]

    [-x xlist] [-d exdir]
    Default action is to extract files in list, except those in xlist, to exdir;
    file[.zip] may be a wildcard. -Z => ZipInfo mode ("unzip -Z" for usage).

    -p extract files to pipe, no messages -l list files (short format)
    -f freshen existing files, create none -t test compressed archive data
    -u update files, create if necessary -z display archive comment
    -x exclude files that follow (in xlist) -d extract files into exdir

    modifiers: -q quiet mode (-qq => quieter)
    -n never overwrite existing files -a auto-convert any text files
    -o overwrite files WITHOUT prompting -aa treat ALL files as text
    -j junk paths (do not make directories) -v be verbose/print version info
    -C match filenames case-insensitively -L make (some) names lowercase
    -X restore UID/GID info -V retain VMS version numbers
    -M pipe through "more" pager
    Examples (see unzip.txt for more info):
    unzip data1 -x joe => extract all files except joe from zipfile data1.zip
    unzip -p foo | more => send contents of foo.zip via pipe into program more
    unzip -fo foo ReadMe => quietly replace existing ReadMe if archive file newer

    Error messages:

    Status: 0 (expected 0)
    Executing:

    /homepages/19/d42267495/htdocs/bin/unzip/unzip -j -o /tmp/php1rS8O4 " unzip data1 -x joe => extract all files except joe from zipfile data1.zip" -d /homepages/19/d42267495/htdocs/forum/tmp

    Results:
    Archive: /tmp/php1rS8O4

    Error messages:
    caution: filename not matched: unzip data1 -x joe => extract all files except joe from zipfile data1.zip

    Status: 11 (expected 0)Error: Archive: /tmp/php1rS8O4
    Executing:

    /homepages/19/d42267495/htdocs/bin/unzip/zipinfo -Z -1 /homepages/19/d42267495/htdocs/forum/tmp/ unzip data1 -x joe => extract all files except joe from zipfile data1.zip
    Results:
    none

    Error messages:

    Status: 0 (expected 0)
    Warning: unlink() failed (No such file or directory) in /homepages/19/d42267495/htdocs/forum/gallery/platform/fs_unix.php on line 77***********end**************

    The previous post to which I refer suggested changing util.php which runs the zipinfo command with relevent switches. I have done this hence the switches -Z -1 being shown above. Either way (-1 or -Z -1) I get the same error. I am thinking that maybe the problem is that I do not have access to the /tmp directory on the server. Is it possible to re-configure gallery to use a different directory, maybe one in my own web server path?

    BTW - I have already created a working tmp directory in my own server with 777 permissions, and it is specified in config.php - It is not this temp directory to which I refer, it is /tmp which zipinfo and unzip try to use, with no appparent way of configuring gallery to use a different path. It looks like gallery uploads the file into /tmp and names it with a random name (php1rS8O4.zip above), then unzip tries to unpack the zip into my own tmp directory as specified in config.php. Can the first /tmp path be changed by hacking the code in any way?

    Thanks in advance,

    Paul