Page 1 of 1

Internal Server Error 500 with large POST

Posted: Sat Jul 08, 2006 8:43 pm
by MicahCarrick
I have a form which contains a file upload (<2MB) and a textarea where I need users to be able to insert up to 10,000 characters. However, when I put large amounts of text in that field (tested with 8,000 characters) I get the internal server 500 error. So I guess I have these quesions...

How can I programatically catch this error and handle it appropriately?
Is it because I have a multipart form... Should I split it up into 2 different forms?
How do I know how much is too much to POST?
Can I adjust somewhere how much can be POSTed?

- Micah

Posted: Sat Jul 08, 2006 8:49 pm
by Weirdan
How can I programatically catch this error and handle it appropriately?
As far as I know, you can't.
How do I know how much is too much to POST?
Can I adjust somewhere how much can be POSTed?
http://us2.php.net/manual/en/ini.core.p ... t-max-size

Posted: Sat Jul 08, 2006 9:39 pm
by MicahCarrick
Just to see if it's the problem... I modified php.ini with the following...

post_max_size = "32M"
upload_max_filesize = "5M"
memory_limit = "16M"
max_execution_time = 60
max_input_time = 90

And it still does it. I can put 4000 characters in the textarea and it posts fine. But when I have the textarea with those 4000 characters AND 2 files being uploaded (totally about 1 MB) I get the Internal Server Error 500.

Any more suggestions?

Posted: Sat Jul 08, 2006 9:44 pm
by Benjamin
Do you have an .htaccess file in there by chance?

Posted: Sat Jul 08, 2006 9:50 pm
by MicahCarrick
Yes, but it's empty.

Posted: Sat Jul 08, 2006 11:12 pm
by hawleyjr
I have yet to try and post a 10,000 character field but you can use javascript to determine the field length prior to submitting the form.

Posted: Sun Jul 09, 2006 12:04 am
by RobertGonzalez
MicahCarrick wrote:And it still does it. I can put 4000 characters in the textarea and it posts fine. But when I have the textarea with those 4000 characters AND 2 files being uploaded (totally about 1 MB) I get the Internal Server Error 500.

Any more suggestions?
Try posting only a large amount of text with no files. Say, 6000 characters. In fact, take the 4000 character string you are saying works and use it twice (copy and paste it) to see if it is the file uploads in conjunction with the large text post or if it is just the large text post.