Internal Server Error 500 with large POST

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
MicahCarrick
Forum Newbie
Posts: 23
Joined: Sat Apr 09, 2005 5:40 pm

Internal Server Error 500 with large POST

Post 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
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post 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
MicahCarrick
Forum Newbie
Posts: 23
Joined: Sat Apr 09, 2005 5:40 pm

Post 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?
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

Do you have an .htaccess file in there by chance?
MicahCarrick
Forum Newbie
Posts: 23
Joined: Sat Apr 09, 2005 5:40 pm

Post by MicahCarrick »

Yes, but it's empty.
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

Post 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.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post 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.
Post Reply