D
DJ Stunks
Hey all,
I'm having a problem uploading a file larger than roughly 1MB using
CGI.pm, however I feel the problem may be coming from mod_perl or
apache.
Background - I am uploading an MS Excel spreadsheet using filefield via
CGI.pm. The second script should take this file (as the filehandle -
not saving the file to the filesystem), parse it using
Spreadsheet:arseExcel and output values from various rows/columns.
Versions - Apache/2.0.53 (Unix)
mod_perl/1.999.21
Perl/v5.8.0 i386-linux-thread-multi,
O/S: Linux 2.4.18-14smp,
RAM - 4GB...
Problem - with smaller XLS files (up to ~1MB) the script behaves well.
With a 1.43MB file, the apache error log records the following:
[Fri Jan 20 17:07:27 2006] [warn] -T switch is ignored, enable
with 'PerlSwitches -T' in httpd.conf\n
Out of memory!
[Fri Jan 20 16:55:48 2006] -e: Callback called exit.
You can see that the memory error message is not formatted in the
traditional apache way, and doesn't show who threw the error. This
seems odd...
I have tried setting
$CGI:OST_MAX = 10_000 * 1024; # max file upload size to ~10MB
but it didn't make a difference. From the docs it would appear that
CGI.pm does not limit upload file sizes by default. It would also
appear that Apache does not limit filesizes by default either.
I would appreciate any advice. I have seen many posts on Google for a
similar problem in PHP but nothing useful in Perl.
TIA,
-jp
I'm having a problem uploading a file larger than roughly 1MB using
CGI.pm, however I feel the problem may be coming from mod_perl or
apache.
Background - I am uploading an MS Excel spreadsheet using filefield via
CGI.pm. The second script should take this file (as the filehandle -
not saving the file to the filesystem), parse it using
Spreadsheet:arseExcel and output values from various rows/columns.
Versions - Apache/2.0.53 (Unix)
mod_perl/1.999.21
Perl/v5.8.0 i386-linux-thread-multi,
O/S: Linux 2.4.18-14smp,
RAM - 4GB...
Problem - with smaller XLS files (up to ~1MB) the script behaves well.
With a 1.43MB file, the apache error log records the following:
[Fri Jan 20 17:07:27 2006] [warn] -T switch is ignored, enable
with 'PerlSwitches -T' in httpd.conf\n
Out of memory!
[Fri Jan 20 16:55:48 2006] -e: Callback called exit.
You can see that the memory error message is not formatted in the
traditional apache way, and doesn't show who threw the error. This
seems odd...
I have tried setting
$CGI:OST_MAX = 10_000 * 1024; # max file upload size to ~10MB
but it didn't make a difference. From the docs it would appear that
CGI.pm does not limit upload file sizes by default. It would also
appear that Apache does not limit filesizes by default either.
I would appreciate any advice. I have seen many posts on Google for a
similar problem in PHP but nothing useful in Perl.
TIA,
-jp