Question: My CGI script is giving me a 500 Internal Server Error. What should I do?
Answer: It is one of the most dreaded errors Apache can throw at you: the 500 Internal Server Error. When you get it, you often have no idea what caused it or why. Here are a few things you can do to troubleshoot it.
1. Check the location. Make sure you have uploaded the scripts in the right place.
2. Check the upload method. Your FTP program should upload Perl scrips in ASCII not in binary mode.
3. Make sure the file permissions are set to 755 to make the script executable.
4. Often times modifications to the script, if required to configure, can cause an error. You might have slipped in an unsupported character or made a typo.
If it still does not work, try running the script from the command line and see if it spits out an error. If you still cannot figure it out, you might want to talk to the developer. The script just might be incompatible with your server. Most importantly, don’t give up.
Photo: Flickr