in reply to Re^5: Archive::Zip errors
in thread Archive::Zip errors

The apache daemon will write to these directories in response to events from remote users interaction via cgi. When the same remote connection to the same cgi script invokes archive::zip it wiill not write a file. This code will write to disk:
open(WOBBLE, ">/caralan_com/system/proofing/cam_proofs/steve/live/fl +unk2.txt"); my $zip = Archive::Zip->new(); $zip->addTree( '/delme/wibble', 'customer_uploads' ); $zip_return_code = $zip->writeToFileHandle('WOBBLE'); close(WOBBLE);
But this will not:
my $zip = Archive::Zip->new(); $zip->addTree( '/delme/wibble', 'customer_uploads' ); $zip_return_code = $zip->writeToFileNamed('/delme/$proofstem.zip');

Replies are listed 'Best First'.
Re^7: Archive::Zip errors
by pboin (Deacon) on Nov 04, 2005 at 17:19 UTC

    You're allocating two different files, but both are ultimately being written to by Archive::Zip. So, again: You have a permissions problem. I don't see any problem whatsoever with the module at this point.

    To debug this, both snippets should try to write to the same filename in the same directory. If you can do that and *still* have one work and one not, then we have somthing interesting...

    Update:

    In case you're confused, it looks like the first snippet is writing to "/caralan_com/system/proofing/cam_proofs/steve/live/flunk2.txt".

    The second is writing to "/delme/$proofstem.zip"