stargrazer has asked for the wisdom of the Perl Monks concerning the following question:

In running Apache 2 and mod_perl 2, I'm trying to use a web browser to transfer files to the server using Apache::Request using $r-upload(). I'm trying to be lazy and use what ever is existing with Debian Sarge installs. (I've seen the link for How can I get started with a file upload script?) but it doesn't use the Apache 2/MP2/Mason framework. In cruising the 'net, it appears that libapreq2, which supplies this function, is imcomplete, buggy, or whatever. Ie, the Apache log file gives me program termination errors whenever starting the library.

This function is used in the shared/manipUpload.comp from the download at http://mason-cm.itassistance.biz. This package seems to work in Apache 1.3, and the upload is about the only thing not working in Apache 2, MP 2, and Mason.

Anybody have updates on Apache 2.0, MP 2, and Apache::Request status?

Thanx.

Ray.

Retitled by BazB from 'libapreq2'.

  • Comment on File upload with mod_perl2 and libapreq2

Replies are listed 'Best First'.
Re: File upload with mod_perl2 and libapreq2
by Errto (Vicar) on Apr 03, 2005 at 21:21 UTC

    I'm pretty sure libapreq2 is still in beta. If you want the most complete working version of it and Apache::Request, you'll need to get the latest sources from the CPAN. But in all likelihood these later versions depend on more recent versions of mod_perl2 itself, largely because they may depend on some mod_perl functions that were unimplemented in earlier versions. So you may have to install that from source as well

    In terms of production code, if you're stuck I would say either stay with Apache 1.3 or else use CGI.pm or CGI::Simple instead of Apache::Request. They're slower but much more likely to work.