Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^6: Archive::Zip errors

by fluffyvoidwarrior (Monk)
on Nov 04, 2005 at 16:55 UTC ( #505776=note: print w/replies, xml ) Need Help??


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"

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://505776]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2017-12-17 18:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (466 votes). Check out past polls.

    Notices?