500error

First of all, my apologize to you for not being able to access blogjer this evening, it’s due to 500 Internal server error. I’m not sure when it had started, but in my spot check on the error log (only shows the last 300 lines), the oldest one is at 11 AM GMT (6.00 PM Malaysia time).

I have seen this error a few times before, so I guess I know what is going on. But it turns out that I’m wrong. In fact I’ve no idea of what is going on, and why it happens??

Ok, before that, to give you a basic idea about 500 internal server error, it normally happens when your .htaccess file is corrupted of having syntax error. Keep in mind that this is NOT due to server down or Apache error.

What happened

My web-hosting company had just upgraded the cPanel to the latest version. When I logged in to cPanel, I was a little bit panic when I didn’t see my .htaccess file. To make me feel more nervous, other websites that is hosted on the same hosting package have their own .htaccess file and their .htaccess invisible too, but all of them work just fine.

I then opened an ftp connection to my web-hosting, oh I’m relieved,  could see that the file is still there. I compared it to my other blogs’s .htaccess, it is similar to the others though. I lost!!

Without any delay, I cut a ticket  to my hosting, and within 20 minutes everything is settled. Kudos to NetKL!!  It turns out that this is syntax error, where there is a duplicate close tag in the .htaccess file. But.. the extra close tag has been there for quite sometime and blogjer works fine so far.

...........
...........


Redirect temp /xxxxxxxxx

I don’t understand why it works before and not after the cPanel upgrade. Need more digging perhaps.

On why the .htaccess is invisible from cPanel, this is the security enhancement on the new cPanel version. The files are only viewable and editable from FTP client.

What I can suggest if you get this error?

cPanellog

  1. Open your cPanel, locate where your error log is. See the screen shot above. It is located somewhere at the bottom of your cPanel main menu. In my case, I saw an error something like this which mention about .htaccess
  2. [Mon Feb 18 17:59:22 2008] [alert] [client xx.xxx.xx.xxx] /home/public_html/blogjer/.htaccess:  without matching  section, referer: http://www.google.com/search?hl=en&q=DELL+MALAYSIA&btnG=Google+Search
  3. If you can view your .htaccess file from your cpanel, that would be better. Otherwise you need an ftp client such as coreftp or filezilla to do that. From your ftp client, download your .htaccess file to your local machine.
  4. Validate your .htaccess file with Alterlinks. This tool would be able to identify anything wrong with it. Fully loaded yourself with more info at .htaccess page
  5. After identify what’s wrong try fixing it by yourself. Google is always there for you. And don’t forget your web hosting company!!

Preventive action

There is nothing better other than having a backup of your .htaccess elsewhere. Preventive is better than cure. Utilize your cPanel backup function

Further reading

There are a lot of HTTP status codes, 500 is only one of them. To know more status codes such as 200, 300, 400, are, turn your browser to HTTP status codes.

Happy reading and blogging!!

Related Posts

 
If you like this post then please consider subscribing to my full feed RSS
You can also subscribe by Email and have new posts sent directly to your inbox.



Free Web Hosting

 

RSS feed | Trackback URI

18 Comments »

Comment by Raymond Subscribed to comments via email
2008-02-18 17:00:15

Hi Zaki,

Glad to see your blog is okay now.

I do not understand this:

“…their .htaccess visible too, but all of them work just fine.”

Do you mean invisible?

P.S. I just got back today and have received the T-shirt you sent. Thanks, mate!

Comment by zaki
2008-02-19 13:53:15

You’re rite, type error.

Cool!! Hope you like it

 
 
Comment by catzer
2008-02-19 04:41:47

500 Internal server error never happen to my site yet, however thanks for let me know how to fix it incase it happen someday.

 
Comment by azwanhadzree Subscribed to comments via email
2008-02-19 10:38:13

you r on netkl to .. cool :)
so far didnt face this problem

Comment by zaki
2008-02-19 13:51:31

Yes, blogjer on NetKL

 
 
Comment by alzack
2008-02-19 12:40:55

Wow…thanks for the info…Last time I had this problem …i gave up….at least now…i can know what to do…

Comment by zaki
2008-02-19 13:58:56

Hehe, I learn from mistakes too

 
 
Comment by Weight Loss Wand
2008-02-19 13:39:48

I have faced this problem of internal errors many times and it was always difficult for me to solve. But this information has helped me a lot to face this problem easily.

 
Comment by KNizam
2008-02-19 15:05:42

cool precaution. i will need this some time if affected :)

 
2008-02-19 16:26:07

[...] and just left the blog as it is. (If you face Internal Server Error 500 problem, you can refer to blogjer.com for some ideas to solve [...]

 
Comment by shaz
2008-02-20 13:36:36

dun play2 with .htaccess hehe..
luckily your blog is okay now…

Comment by zaki
2008-02-21 22:14:14

It’s the hosting company who play2, hehehe

 
 
Comment by catzer
2008-02-20 16:42:19

it happen to me today.. :p luckily it just blog experiment during tutorial.

 
Comment by megat
2008-02-21 08:41:50

Thanks for the info! Great! At least here i have info for that problem.

 
2008-03-02 03:18:34

[...] how to fix 500 Internal server error in wordpress [...]

 
Comment by Campy
2008-03-18 22:27:42

Nice info. Thanks!!!

 
Comment by Reyality
2008-05-02 18:42:27

Thanks a lot for the info… it was very helpful!

Comment by zaki
2008-05-03 13:37:55

Sure, you’re most welcome. Hope to see you again

 
 
Name (required)
E-mail (required - never shown publicly)
URI

Subscribe to comments via email
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.