Thursday, June 12, 2008

Problem uploading large file in CGI script

Today I had a problem uploading large file using the CGI upload script I have written using Perl couple of day back. I was getting the response: "413 Request entity too large". I searched Google and found out that this problem can occur for mainly two reasons: if size of the file being uploaded is greater than the value of $CGI::POST_MAX in the upload script, and if the value of the apache (web server) directive LimitRequestBody is lower than the file size. But both cases were handled. But I was still getting the 413 error. Then I found that it was my local server which prevented me to upload large file size. the 413 was coming from that machine instead of the server where the script is hosted :(

No comments: