itshare

Error Indexing – KnowledgeTree 3.5.4

Ditemukan error saat proses indexing document pada instalasi KnowledgeTree 3.5.4 Community Edition (non-commercial version). KnowledgeTree dapat didownload disini.

KnowledgeTree diinstall di sub-folder, yaitu:
http://localhost/dms/

Crontab indexing dijalankan setiap 5 menit sesuai panduan instalasi:
*/5 * * * * /var/www/dms/bin/scheduler.php > /dev/null

Error di folder $INSTALLDIR/var/log didapatkan lebih kurang begini:
<p>The requested URL /search2/indexing/bin/cronIndexer.php was not found on this server.</p>

Atau bila kita menjalankan scheduler.php di shell prompt maka akan muncul pesan:
2009-01-13 | 17:20:02 | INFO | 29189 | 692 | n/a | dms | default | main | Scheduler - Output: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /search2/indexing/bin/cronIndexer.php was not found on this server.</p>
<hr>
<address>Apache Server at 127.0.0.1 Port 80</address>
</body></html>

Analisa error dikarenakan HTTP client tidak menemukan URL http://localhost/search2/indexing/bin/cronIndexer.php. Padahal seharusnya URL yang benar adalah:

http://localhost/dms/search2/indexing/bin/cronIndexer.php

ada sub-folder “dms” setelah hostname/domain name.

Hasil googling mendapatkan kalau ini adalah bug di versi 3.5.4, yaitu problem bila instalasi KnowledgeTree dengan model “sub-folder”, dan akan diperbaiki di versi 3.5.5:

http://issues.knowledgetree.com/browse/KTS-3500

Sambil menunggu versi perbaikan, dari error log langsung teringat “swiss army knife”-nya Apache! apalagi kalau bukan mod_rewrite🙂. Singkat cerita tambahkan 2 baris berikut di file .htaccess di bawah direktori DocumentRoot (/var/www):

RewriteEngine on
RedirectMatch ^/search2/(.*)$   http://localhost/dms/search2/$1

Jangan lupa edit konfigurasi Apache, file /etc/apache2/sites-enabled/000-default, pada section <Directory /var/www/> di directive AllowOverride None menjadi AllowOverride All.

Terakhir, restart Apache: /etc/init.d/apache2 restart

Untuk menceknya, coba jalankan kembali scheduler.php dari shell prompt. Bila tidak ada error message yang muncul maka problem sudah tidak ada. Atau dapat dicek via browser langsung, ketikkan:

http://localhost/search2/indexing/bin/cronIndexer.php

maka halaman akan diredirect ke:

http://localhost/dms/search2/indexing/bin/cronIndexer.php

Alhamdulillah! Sekarang proses indexing akan berjalan normal🙂

Standard

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s