in reply to Re: CGI::Application file uploads buffering
in thread CGI::Application file uploads buffering

ALso I note that there's a temp file in /var/tmp called CGItempXXXX. Why is this here if I'm using file::temp?
  • Comment on Re^2: CGI::Application file uploads buffering

Replies are listed 'Best First'.
Re^3: CGI::Application file uploads buffering
by cjb (Friar) on Mar 24, 2011 at 14:56 UTC

    perldoc seems to indicate "under Accessing the temp files directly" that's expected behavior for CGI.pm. You might want to look at the section "Progress bars for file uploads and avoiding temp files"

      Thanks. When experimenting we found that files > 2.1 GB cause an error in apache:
      Invalid Content-Length (-3)Unknown error: Error reading request entity data
      I think I need to go find out if this bug is fixed. Running 2.2.8, so it's old. Still curious as how to get avoid writing to /tmp like that. Thanks

        Do your filesystem, OS, perl, and apache installs support files larger than 2GB? 2**32 == 4294967296 (4GB), and the signed version of that value is 2GB, you are limited to 2GB unless all of the above use file offsets of greater than 2**32. Search for "largefile".

        Update: Specifically, run perl -V | grep -i largefile and see what it says. Mine has uselargefiles=define and -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' in the output. I seem to remember Apache having the same type of configuration, I know that my filesystem has to have a flag set to support large files, and operating systems have not always supported files larger than 2**31-1.

        --MidLifeXis