Lunarpages Web Hosting Forum

Author Topic: Bizarre 500 (Internal Server) errors on .htaccess  (Read 980 times)

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6419
Bizarre 500 (Internal Server) errors on .htaccess
« on: January 23, 2019, 11:19:06 AM »
Last night my entire site went down in flames. This morning, no page could be loaded, all getting 500 errors. The Error Log in cPanel was filled with errors including the phrase "No comments are allowed here". Support merely informed me that I had a syntax error in my .htaccess and it was my job to find it. I found a broken comment:
Code: [Select]
deny from xxx.xxx.xxx.xxx  # yyyy-mm-ddwhere the # had been turned into a $. I was sure I hadn't done that (as I had successfully loaded pages after my last .htaccess edit).

I found an explanation for "No comments are allowed here" via Google (https://bugzilla.redhat.com/show_bug.cgi?id=1577584 and others) that the deny from and allow from lines no longer permit a following comment. Well, that's stupid. I guess the Apache .htaccess processor is so convoluted now that it's unmaintainable. Anyway, stripping off the comments (or splitting them off onto their own lines) fixes it.

I'm guessing that once again, LP tried to auto-patch my .htaccess files, and only succeeded in breaking them. Sigh. This is at least the second time this has happened. Why couldn't they hold off on the upgrade, inform all customers that they need to fix their .htaccess files, and do the upgrade some time later?

Update: I don't know if it happened at the same time, or earlier, but php.ini gives an error if your comment starts with a #. Apparently comments need to start with a ;.
« Last Edit: January 23, 2019, 11:27:34 AM by MrPhil »
Visit My Site

E-mail Me
-= From the ashes shall rise a sooty tern =-

Offline Frankhuh

  • FrankhuhZE
  • Newbie
  • *
  • Posts: 2
Bizarre 500 Internal Server errors on htaccess
« Reply #1 on: March 28, 2019, 01:53:44 AM »
I started getting the same web server errors yesterday. I think it might be the latest windows update from yesterday that is causing it.

I uninstalled KB4088776  and my web server is working again

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6419
Re: Bizarre 500 (Internal Server) errors on .htaccess
« Reply #2 on: March 28, 2019, 04:12:50 AM »
Is this a Lunarpages server, or a WAMPP installation? Perhaps on a self-managed server you could roll back a Windows update. I can't imagine why a PC running Windows would have any effect on an LP-hosted server. This support forum should only be used for Lunarpages servers, and not to discuss support of PC installation *AMPP servers.

Anyway, it sounds like you're now deliberately running on a back level of server, which carries its own risks. At some point, you will need to bite the bullet and modify your .htaccess to not have any trailing comments on "deny" lines.
Visit My Site

E-mail Me
-= From the ashes shall rise a sooty tern =-