Penyebab Umum Internal Server Error

Penyebab Umum Internal Server Error

Banyak hal yang bisa menyebabkan terjadinya error ini, di sini hanya akan dijelaskan penyebab umum dan yang bisa ditangani oleh pengelola web.

Penyebab umum terjadinya Internal Server Error:

  1. Hak akses file dan direktori yang salah (Directory and File Permissions)
  2. Kesalahan konfigurasi pada file konfigurasi, file dengan awalah titik (.), seperti .htaccess
  3. Kesalahan coding

Cari Sumber Masalah

Kita tidak bisa menemukan solusi kalau masalah saja tidak diketahui. Web server tidak hanya menuliskan Internal Server Error saja tetapi juga meninggalkan error log. Di hosting cPanel error log bisa dilihat lewat:

  1. cPanel > Error Log
  2. File error_log

Anda juga perlu tahu waktu kejadian error karena di error log bisa menyimpan banyak catatan error dan di error log dicatat berdasarkan waktu kejadian. Supaya mempermudah mencari sumber masalah maka ada baiknya kita mengetahui waktu terjadinya error. Silahakan dicari pesan error sesuai dengan waktu kejadian.

Di bawah ada beberapa  contoh pesan error:

[Mon Aug 24 00:33:20 2009]

[client xxx.xxx.xxx.xxx] SoftException in Application.cpp:252: File "/home/xxxx/public_html/joomla/index.php" is writeable by group

[Mon Aug 24 00:41:35 2009]

[client xxx.xxx.xxx.xxx] SoftException in Application.cpp:260: File "/home/xxxx/public_html/joomla/index.php" is writeable by others

[Mon Aug 24 00:44:09 2009]

[client xxx.xxx.xxx.xxx] SoftException in Application.cpp:544: Directory "/home/xxxx/public_html/joomla/administrator" is writeable by group

[Mon Aug 24 00:43:50 2009]

[client xxx.xxx.xxx.xxx] SoftException in Application.cpp:553: Directory "/home/xxxx/public_html/joomla/administrator" is writeable by others

[Mon Aug 24 01:01:02 2009] [alert] [client xxx.xxx.xxx.xxx] /home/xxxx/public_html/joomla/.htaccess: Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration

Solusi

Kita ambil contoh error yang di atas, di sana tertulis:

[Mon Aug 24 00:33:20 2009]

[client xxx.xxx.xxx.xxx] SoftException in Application.cpp:252: File "/home/xxxx/public_html/joomla/index.php" is writeable by group

Dengan sangat jelas dikatakan bahwa file index.php dapat ditulis oleh group (writeable by group), solusinya, anda harus ganti permission index.php menjadi tidak dapat ditulis oleh group.

[Mon Aug 24 00:41:35 2009]

[client xxx.xxx.xxx.xxx] SoftException in Application.cpp:260: File "/home/xxxx/public_html/joomla/index.php" is writeable by others

Kalau error di atas, file index.php dapat ditulis oleh others (world) jadi anda harus mengganti permission index.php menjadi tidak bisa ditulis oleh world.

[Mon Aug 24 00:43:50 2009]

[client xxx.xxx.xxx.xxx] SoftException in Application.cpp:553: Directory "/home/xxxx/public_html/joomla/administrator" is writeable by others

[Mon Aug 24 00:43:50 2009]

[client xxx.xxx.xxx.xxx] SoftException in Application.cpp:553: Directory "/home/xxxx/public_html/joomla/administrator" is writeable by others

Error di atas sama dengan error yang sebelumnya, hanya saja error kali ini terjadi pada direktori.

Masalah hak akses file dan direktori lebih detailnya dibahas di artikel Directory and File Permissions.

[Mon Aug 24 01:01:02 2009] [alert] [client xxx.xxx.xxx.xxx] /home/xxxx/public_html/joomla/.htaccess: Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration

Kalau pesan error di atas memberitahukan ada kesalahan pada konfigurasi di file .htaccess, yang perlu anda lakukan adalah menghapus invalid command (perintah yang salah), untuk contoh ini anda harus membuka file .htaccess dan menghapus perintah php_flag.

Server Load

Kalau web anda kadang terjadi Internal Server Error dan kadang tidak dan anda yakin tidak melakukan perubahan apapun dan tidak ada apapun yang berubah pada web anda (file dan direktori permission). Silahkan diperiksa server load hosting anda. Untuk hosting dengan cPanel, server load bisa dilihat di cPanel > Service Status. Untuk masalah ini harus hubungi pihak penyedia hosting karena anda tidak punya hak untuk mengakses konfigurasi server.

load