Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Problem in File Upload

by Anonymous Monk
on Feb 23, 2011 at 14:04 UTC ( #889794=perlquestion: print w/ replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi Perl Monks,

I am trying to upload files using below Perl script, but I am getting error as
Can't locate auto/APR/Request/Param/ in @INC (@INC contains: .....

my $upload = $r->upload("filename"); my $fh; open FHANDLE, ">$filepath"; $fh = $upload->fh(); binmode FHANDLE; print FHANDLE <$fh>; close FHANDLE;

What's wrong in this code? How can I resolve this issue, Please provide me solution.


Comment on Problem in File Upload
Download Code
Replies are listed 'Best First'.
Re: Problem in File Upload
by moritz (Cardinal) on Feb 23, 2011 at 14:10 UTC
    It is highly unlikely that the code you've shown us triggers that error.

    It is likely that a not properly installed APR::Request::Param causes that error.

    Still there's something wrong with the code you've shown us too: it open a file without checking if it succeeded. That is only acceptable if autodie is in scope.

Re: Problem in File Upload
by ww (Bishop) on Feb 23, 2011 at 14:12 UTC
    "using below Perl script,...."

    Not a script; a fragment and not one from which I can deduce what you're doing... despite the (semi-) self-explanatory message, Can't locate auto/APR/Request/Param/ in @INC -- which means that somewhere, your actual code is looking for other than where it actually exists (if, indeed, it does on your machine).

    You're going to need to give me (and possibly, better informed Monks, as well) more information.

Re: Problem in File Upload
by Anonymous Monk on Jan 28, 2013 at 16:45 UTC
    For the record this can be caused by not including "use Apache2::Upload;" in the package in question. It's an extra step you need when using Apache 2.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://889794]
Approved by ww
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2015-10-09 09:44 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (237 votes), past polls