讓 AWStats 正常顯示 UTF-8 關鍵字 at FreeBSD

| Posted at 四月 13, 2008 | 沒有迴響 | 沒有引用 | 970 reads. | Size: L, M, S | Edit: P, C |
| Under Server, and Tags: , .  |

    昨天看到 mouson 在寫 AWStats 的文章「[軟體使用] AWStats 分析您的Log檔」,才知道原來已經有 plugin 可以處理這個,之前用的是偷吃步的方法「讓 AWStats 顯示 UTF-8 繁體中文」。剛剛來處理了一下,順便紀錄一下 FreeBSD 可能會遇到的問題。

    參考 Neo 的文章「Awstats 正常顯示搜尋引擎 UTF-8 關鍵字的方法」,編輯 awstats.XXX.cof 檔案,在 1261 行左右可以找到:

    #LoadPlugin="decodeutfkeys"

    把註解拿掉,重新跑更新:

    ./awstats.pl --config=XXX --update

    如果這樣就可以正常顯示,那就恭喜了。搞定收工!

     

    不過我就沒這麼爽了,最常遇到的可能是這兩個問題。如果打開 AWStats 會顯示:

    Error: Plugin load for plugin 'decodeutfkeys' failed with return code: Error: Can't locate URI/Escape.pm in @INC

    開頭的一大段錯誤訊息,這是因為缺少 Perl 的 URI:

    # cd /usr/ports/net/p5-URI
    # make install clean

    完成後再去看看,是否正常。

     

    如果顯示的錯誤是下面這串:

    Error: Plugin load for plugin 'decodeutfkeys' failed with return code: Error: Can't locate Encode.pm in @INC

    這是缺少了 Encode 這個模組:

    # cd /usr/ports/converters/p5-Encode
    # make install clean

    再去看看,老天保佑成功啊!

     

    如果還是不行,那就... 再搜尋看看吧 :p  正常畫面:

    AWStats-UTF8


    隨機文章:
    » 讓 AWStats 顯示 UTF-8 繁體中文
    » 2007 留言板
    » Ubuntu 6.06 (Dapper Drake) Beta Release
    » MySQL 升級後續 - 亂碼、編碼問題
    » PC-BSD 0.8.2 Online!


Leave A Comment: