D
D. Buck
I have a perl script (I didn't write) running on HP-UX that gets .zip
files from a Linux ftp server. It downloads the files and unzips
them. Every thing works fine. My problem is if I try to use the same
script on the same HP-UX box but try to get the (same) files from a
Windows ftp server. The files download fine, but when it tries to
unzip them, I get the following:
--------------
error [20040623064641.zip]: missing 273 bytes in zipfile
(attempting to process anyway)
error [20040623064641.zip]: attempt to seek before beginning of
zipfile
(please check that you have transferred or created the zipfile in
the
appropriate BINARY mode and that you have compiled UnZip properly)
(attempting to re-compensate)
/test/test20040623064641/0292409005.TIF bad CRC e1458190 (should be
71c1779c)
file #2: bad zipfile offset (local header sig): 57546
(attempting to re-compensate)
file #2: bad zipfile offset (local header sig): 57546
file #3: bad zipfile offset (local header sig): 119940
file #4: bad zipfile offset (local header sig): 170821
..
..
..
--------------
and so on....
It is looking like it isn't successfully seting the mode to binary.
Here is a part of the script that handles this:
--------------
my ($binaryflag) = 1;
if ($binaryflag)
{
if ($ftp->type("binary"))
{
title_logger("DEBUG","non zero return from type");
}else
{
title_logger("DEBUG","zero return from type");
}
}
--------------
The output of the title_logger sub routine is: DEBUG : zero return
from type
Any ideas why it isn't getting set to binary? Any thoughts on how to
ensure it is set to binary?
Thanks for any help you can give me.
T.
p8oust7eh+
files from a Linux ftp server. It downloads the files and unzips
them. Every thing works fine. My problem is if I try to use the same
script on the same HP-UX box but try to get the (same) files from a
Windows ftp server. The files download fine, but when it tries to
unzip them, I get the following:
--------------
error [20040623064641.zip]: missing 273 bytes in zipfile
(attempting to process anyway)
error [20040623064641.zip]: attempt to seek before beginning of
zipfile
(please check that you have transferred or created the zipfile in
the
appropriate BINARY mode and that you have compiled UnZip properly)
(attempting to re-compensate)
/test/test20040623064641/0292409005.TIF bad CRC e1458190 (should be
71c1779c)
file #2: bad zipfile offset (local header sig): 57546
(attempting to re-compensate)
file #2: bad zipfile offset (local header sig): 57546
file #3: bad zipfile offset (local header sig): 119940
file #4: bad zipfile offset (local header sig): 170821
..
..
..
--------------
and so on....
It is looking like it isn't successfully seting the mode to binary.
Here is a part of the script that handles this:
--------------
my ($binaryflag) = 1;
if ($binaryflag)
{
if ($ftp->type("binary"))
{
title_logger("DEBUG","non zero return from type");
}else
{
title_logger("DEBUG","zero return from type");
}
}
--------------
The output of the title_logger sub routine is: DEBUG : zero return
from type
Any ideas why it isn't getting set to binary? Any thoughts on how to
ensure it is set to binary?
Thanks for any help you can give me.
T.
p8oust7eh+