I've been down this road. If wrapping $r->upload() in an eval block doesn't solve the problem, it's likely that you need to upgrade libapreq2 to v2.18 (or newer):
https://www.inter-corporate.com/kb/internal-apreq-error.pl If your Linux distribution doesn't include libapreq2 v2.18 (or newer), the instructions at the above link provides the steps for compiling from offical source and upgrading to it. > I am seeing some very suprising behavior with calling ->upload on a > Apache2::Request object (with use Apache2::Upload). It appears that if > the user did not click and select a file to upload, that is to say left > the <input type="file" ...> field empty, the server stops processing the > perl code and immediately sends a response to the browser with whatever > it has so far. No error message appears in the error log. > > It appears that this happens if *any* file field is left un-filled, that > is to say, ->upload("file1") will silently die even if file1 was > specified, if file2 was left un-filled. > > I have written up a description and replication code here: > > http://back.nber.org/sys-admin/apache2_upload_bug.html > > Is this something anyone else has seen? > > Thanks, > > - Alex Aminoff > > NBER > > Randolf Richardson, CNA - rand...@inter-corporate.com Inter-Corporate Computer & Network Services, Inc. Beautiful British Columbia, Canada https://www.inter-corporate.com/