Form POST Upload + PowerPoint file = HTTP 413 Error
Posted: Mon Jan 26, 2004 4:08 pm
I have encountered a very strange problem involving an HTML form POST with a File Upload field and a Microsoft PowerPoint file. This problem is a bit difficult to put into words, so I will first start by what I am trying to do, what I have already done, and what I have already discovered:
What I am trying to do:
I have a very simple HTML form with the action set to POST and the ENCTYPE set to multi-part/formdata. All that is on the form is a File Upload field and a Submit button. I was initially posting to a PHP script to take the uploaded file and save it on the server. Then I tried to upload a 1.4MB PowerPoint file through the form and the browser went straight to the "Page cannot be displayed" error. If I do a packet sniff while I try it, I can see the server is returning "HTTP Error 413 - Request entity too large."
What I have tried:
I checked the php.ini file's Max Upload size and Max Post size settings and all are set much higher than the size of the PowerPoint file, so it is not a size issue. I then tried posting to other PHP files with the same result. I even tried to post to a plain old text file and a html file with the same results. I also tried all of the above through Netscape. The only difference there was Netscape just popped up a little dialogue box saying, "Alert: Document contained no data." This only happens on PowerPoint files with more than 2 large jpeg images in it. Two jpeg images in a one-slide presentation seems to be the breaking point. Even if the PowerPoint file is compressed with ZIP, RAR, or ACE it still will not upload. The server I am trying to post to is running Apache/2.0.40 (Red Hat Linux). I have even tried posting to other servers with the same result.
Has anyone encountered this problem or heard about it? It has got to be the oddest thing I have ever seen.
What I am trying to do:
I have a very simple HTML form with the action set to POST and the ENCTYPE set to multi-part/formdata. All that is on the form is a File Upload field and a Submit button. I was initially posting to a PHP script to take the uploaded file and save it on the server. Then I tried to upload a 1.4MB PowerPoint file through the form and the browser went straight to the "Page cannot be displayed" error. If I do a packet sniff while I try it, I can see the server is returning "HTTP Error 413 - Request entity too large."
What I have tried:
I checked the php.ini file's Max Upload size and Max Post size settings and all are set much higher than the size of the PowerPoint file, so it is not a size issue. I then tried posting to other PHP files with the same result. I even tried to post to a plain old text file and a html file with the same results. I also tried all of the above through Netscape. The only difference there was Netscape just popped up a little dialogue box saying, "Alert: Document contained no data." This only happens on PowerPoint files with more than 2 large jpeg images in it. Two jpeg images in a one-slide presentation seems to be the breaking point. Even if the PowerPoint file is compressed with ZIP, RAR, or ACE it still will not upload. The server I am trying to post to is running Apache/2.0.40 (Red Hat Linux). I have even tried posting to other servers with the same result.
Has anyone encountered this problem or heard about it? It has got to be the oddest thing I have ever seen.