Why do I receive a 500 error when submitting a form?

A 500 error can mean a number of things. To narrow down the possible cause, please read the heading that best describes your situation below.

I am submitted a form with a large block of text

This is almost always caused by one of the following items:

  • Your server's "post_max_size" setting is not high enough.
  • mod_security is preventing the submission due to the large submission, either because of PCRE limits or another rule.

post_max_size

You can try to increase this limit by editing the .htaccess file in the root directory of your program's folder. To do this, find the following line:

php_value post_max_size ...

And replace it with the following:

php_value post_max_size 5M

Make sure that there is no pound "#" symbol in front of the "php_value" text.

If the issue persists, you will need to contact your web hosting provider to have this limit increased.

mod_security

If mod_security rules are preventing the submission of large form fields, the only way around this would be to contact your web hosting provider to have these limits increased.

Either scenario

If in either scenario your web hosting provider refuses to make the change, either because they can't or because you are on a shared server which requires the security settings, your only solution is to limit the length of your form posts to smaller sizes.

Article Links

Related Articles

Article Tags

  • No tags found.

Details

Published on 2013/03/26.
Last updated on 2013/03/26.

Was this article helpful?
Yes (0) - No (0)