解決網站統計工具awstats中文關鍵字亂碼問題

默認安裝好的awstats統計工具在顯示中文時會出現亂碼,通過以下幾個步驟解決:

1、打開所要統計網站的配置文件awstats.xxxxx.conf,一般在/etc/awstats下,去掉

#LoadPlugin="decodeutfkeys"

前面的,接下來訪問統計的頁面可能會出現如下的錯誤提示:

Error: Plugin load for plugin 'decodeutfkeys' failed with return code: Error: Can't locate URI/Escape.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl . /usr/share/awstats/lib /usr/share/awstats/plugins) at (eval 3) line 1. 

Setup ('/etc/awstats/awstats.bbsnuaa.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).

2、解決這個問題可採用Perl的CPAN,打開的命令

[root@server ~]# perl -MCPAN -e shell

3、安裝Perl URI/Escape模塊

install URI::Escape

安裝完成之後再運行

/usr/lib/cgi-bin/awstats.pl -config=XXXXX -update
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章