There are lots of different reasons why a script would generate a 500 error… but there’s no good reason at ALL whey a regular HTML page would. Why? Because HTML is not script. It is not executable. It does not “run” on a server, and should therefore not generate Internal Server Errors.

But I’ve seen it happen.

The Problem:
Whenever I tried to access an HTML file on one of my sites, I got a 500-Internal Server Error instead.

Some more detail is required to understand the nature of the problem. On the site in question, ALL of the pages have a .PHP extension. There was one page with a .HTM extension, and I had just added one that happened to have a .HTML extension. That page was the one that threw the error when I tried to load it. I found that kind of odd, given the fact that HTML != SCRIPT. It was also odd because the PHP and .HTM pages loaded fine… it was specifically the HTML page and that page ONLY that was giving me problem. So I changed the page’s extension to .HTM and reloaded it. Guess what? It worked fine.

I could have left it that way, but no… I had to get to the bottom of this madness.


The Cause:
Some setting on my web server was causing it to treat files with an .HTML extension as script instead of…well… HTML. Since HTML is not script, whatever process was trying to “run” it choked and threw a 500 error.

I did some hunting around in my server’s CPANEL configuration applet and found the culprit pretty quickly. It was right there under MIME TYPES.


Cpanel


Somehow, the .HTML extension got associated with MIME
So every time I tried to load a page ending with that extension, the server tried to process it as some kind of email. Or something. Whatever. Now, I don’t remember making that change, and there’s no reason I can think of why I would have, but nevertheless, the association was made:

The Solution:
It was a simple matter to un-do the association. I clicked one button in CPANEL and the HTML page worked fine. If you have the identical problem but are NOT using CPANEL, then you may have a harder (or easier!?) time finding and dealing with this particular setting. But at least you know what to look for.


Fatal error: Call to undefined function: stp_relatedposts() in /home/technow/public_html/wp-content/themes/mandigo-14/single.php on line 36