崬城衞 发表于 2019-1-30 07:35:01

解决网站统计工具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,打开的命令


# perl -MCPAN -e shell

  3、安装Perl URI/Escape模块


install URI::Escape

  安装完成之后再运行


/usr/lib/cgi-bin/awstats.pl -config=XXXXX -update



页: [1]
查看完整版本: 解决网站统计工具awstats中文关键字乱码问题