WordPress Error 500 – Internal server error on Empty Comment

[special update on 2021-02-28 SU] Please note, that if your WordPress worked fine and then suddenly started to displays Error 500 – most likely reason  – it is you own editing error.  For example, you were editing wp_config.php and left some garbage in there, or simply forget to place a semi-colon (;) at the end of a statement – you will get the Error 500.  The way to troubleshoot is to narrow down your search.  In case if you were editing wp_config.php, simply rename it and see if WordPress will start with a wizard (see image to the right).

Problem – Embarrassing Error 500

I am running latest Word Press 3.0.1 on IIS 7.0.  If visitor tries to leave an empty comment or forgets to enter name or email, an ugly 500 – Internal server error will appear on the screen.  This is extremely embarrassing for the host and for the site.

I approximately know that I have three ways to approach this problem:

– Disable error 500 on IIS side to allow WordPress to handle it;

– Lower level of error generated in WordPress code (IIS will not catch it then) or

– Write a local JavaScript to prevent user from posting with empty fields.

Solution – One click in IIS 7

[2010-10-12 TU 09:02]

This is only a problem on IIS 7.0 on Windows 2008 Server.  This is not a problem on Windows 7 and IIS 7.5 and not a problem in Windows XP and IIS 5.1.  And the solution is extremely simple, and doesn’t require changing WordPress Code.  You need to disable custom errors on your IIS 7.0

On your W2K8 Server, go to IIS Manager, open your site, double click on Error Pages.  You should see a list of all error status codes.

Click on Edit Feature Settings…. and change Error Responses to Detailed errors.  Click OK and you are done.  Now your visitor’s errors will be handled gracefully.

(Visited 481 times, 1 visits today)

1 Comment

Your question, correction or clarification Ваш вопрос, поправка или уточнение