Masalah Internal Server Error

on ,
Internal Server Error lagi, Internal Server Error lagi. Kata Internal Server Error memang akrab di mata para pengelola web. Bagi pemula mungkin pesan ini membingungkan. Tapi tidak perlu frustasi. Baca artikel ini untuk mempermudah mengatasi masalah Internal Server Error anda.
Ini adalah salah contoh tampilan Internal Server Error.
Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, xxxxx@xxxxxxxx.xxx and inform them of the time the error occurred, and anything you might have done that may have caused the error.
...

Apa Itu Internal Server Error? 
Internal Server Error adalah pesan yang ditampilkan oleh web server karena web server tidak mampu memenuhi permintaan pengunjung web untuk mengakses URL yang diminta karena ada kesalahan yang terjadi.
Internal Server Error merupakah ‘catch-all’ error yang dihasilkan oleh web server. Error ini muncul karena memang ada yang salah pada server, coding, permission, konfigurasi, atau yang lainnya dan server tidak bisa memberitahu kesalahan tersebut kepada pengunjung web secara spesifik.
Selain pesan kesalahan Internal yang muncul, web server menghasilkan beberapa log mengenai penyebab terjadinya error tersebut. Dan menjadi tugas dari pengelola web untuk mencari tahu dan memperbaiki kesalahan tersebut.
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] [error] [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] [error] [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] [error] [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] [error] [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] [error] [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] [error] [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] [error] [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] [error] [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.


Sumber.

1 komentar: