Why Are File Uploads Causing a ‘500 Error’?

This post is old. It may contain broken links, missing images and incorrect information.

A couple of times recently, I’ve been having trouble with file uploads to the server causing 500 Internal Server Errors.  The first time it happened I solved the problem but forgot to keep a record of what it was that I’d done to fix it.  So, when it happened again (tonight) I thought I’d make a note of the fix just in case it helps anyone else (or I need to remember it again in the future!)

Usually file upload errors are caused by php.ini settings, but it would be unusual for that to result in an Internal Server Error.  The culprit is the fcgid.conf file which can be located here:

/etc/httpd/conf.d/fcgid.conf

All you have to do is add this line:

FcgidMaxRequestLen 1073741824

before.  It will increase the max file upload size allowed by Apached to 1gb (change the number if you want a different amount), from the default limit (128kb).  Don’t forget to restart Apache after making the change.

Jack Barber, freelance web developer based in Whitby, UK

Written By

I'm a freelance web developer based in Whitby, UK. I built my first website using GeoCities, and learned to write HTML and CSS using Notepad. Web technology has come a long way since then, as have my web development skills!

These days I love helping my clients make the most of the internet. I provide design, development, marketing and IT support services, forming long-term partnerships with my clients.

Connect With Me

Posted in Uncategorized