error PHP5 in Slackware 12.2
Waduh nemu error lagi nih satu :) ketika nyoba mau buka file yang berekstensi .php yang sudah disimpan di htdocsnya Apache Slackware dari komputer client, koq malah muncul kodenya :), wah belum keload nih modul PHP nya kayanya :). Lansung saja cari file httpd.conf
root@MSN-Slack:/usr/lib/httpd/modules# locate httpd.conf
/etc/httpd/httpd.conf
/etc/httpd/original/httpd.conf
Ehm… ada di direktori /etc/httpd/, langsung saja aku buka pake vi, lalu search kata php.
vi /etc/httpd/httpd.conf
Ternyata ada di baris-baris terakhir :
# Uncomment the following line to enable PHP:
#
#Include /etc/httpd/mod_php.conf
Hilangkan tanda pagar (#) pada baris terakhir (Include /etc/httpd/mod_php.conf), Save kemudian Close.
Setelah itu aku coba restart httpd (Apache) dengan perintah /etc/rc.d/rc.httpd restart, eh muncul error lagi seperti dibawah :
httpd: Syntax error on line 476 of /etc/httpd/httpd.conf: Syntax error on line 6 of /etc/httpd/mod_php.conf: Cannot load /usr/lib/httpd/modules/libphp5.so into server: libxml2.so.2: cannot open shared object file: No such file or directory
Aku curiga file libphp5.so nya tidak ada atau permissionnya salah, eh setelah aku cek tidak ada yang salah dengan file ini. Kemudian kecurigaanku berpindah ke file libxml2.so.2. Aku cari file tersebut hasilnya nihil :), wah ada pake yang kurang nih kayanya (curiga XML) lalu aku buka http://packages.slackware.it./ terus coba search file libxml2.so.2, dan ternyata dugaanku benar file tersebut ada di paket XML :D (libxml2-2.6.32-i486-2), langsung aku download dan install paket tersebut dengan perintah berikut :
installpkg libxml2-2.6.32-i486-2.tgz
Setelah itu aku coba restart lagi httpd nya dan tada… :) error pun tidak muncul kembali :D, lalu aku coba akses file php tadi dari komputer client :) ga muncul kode lagi sekarang :) he..he..
Semoga bermanfaat.