虚拟主机的操作系统升级后,perl的版本也升级到了5.26.x,awstats的统计中断了,从后台的错误信息:
Unescaped left brace in regex is illegal here in regex; marked by<-- HERE in m/\"%{<-- HERE Referer}i\"/ at ./awstats.pl line 9045.
查了一下,此类信息应该是从5.22开始的:
As written by @Leobaillard you can use his patch. If you want to fix this with your editor (vi) you can go to line 3936 and make the following changes
$ vi buildroot/output/host/usr/bin/automake
goto line :3936 and change
$text =~ s/\${([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
to
$text =~ s/\$\{([^ \t=:+\{\}]+)\}/substitute_ac_subst_variables_worker ($1)/ge;
The error is with automake and perl v5.26.
从perl v5.22开始:不再推荐在正则表达式中使用 {,而且如果没有转义 \{ 会有错误警告,从v5.26开始:不仅有警告,还会有语法错误提示。
解决方法:在所有正则表达式的 "{" "}" 前面增加转义符:
diff -r1.1008 awstats.pl
9045,9050c9045,9050
<$LogFormatString =~ s/\"%{Referer}i\"/%refererquot/g;
<$LogFormatString =~ s/\"%{User-Agent}i\"/%uaquot/g;
<$LogFormatString =~ s/%{mod_gzip_input_size}n/%gzipin/g;
<$LogFormatString =~ s/%{mod_gzip_output_size}n/%gzipout/g;
<$LogFormatString =~ s/%{mod_gzip_compression_ratio}n/%gzipratio/g;
<$LogFormatString =~ s/\(%{ratio}n\)/%deflateratio/g;
---
> $LogFormatString =~ s/\"%\{Referer\}i\"/%refererquot/g;
> $LogFormatString =~ s/\"%\{User-Agent\}i\"/%uaquot/g;
> $LogFormatString =~ s/%\{mod_gzip_input_size\}n/%gzipin/g;
> $LogFormatString =~ s/%\{mod_gzip_output_size\}n/%gzipout/g;
> $LogFormatString =~ s/%\{mod_gzip_compression_ratio\}n/%gzipratio/g;
> $LogFormatString =~ s/\(%\{ratio\}n\)/%deflateratio/g;
作者:车东 发表于:2019-07-04 00:07 最后更新于:2019-07-04 01:07
版权声明 :可以转载,转载时请务必以超链接形式标明文章 Perl 5.22以后的语法更新:Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/\"%{ <-- HERE Referer}i\"/ at ./awstats.pl line 9045. 的原始出处和作者信息及本版权声明。
http://www.chedong.com/blog/archives/001506.html« 免费版StatPlus在Mac Excel 2016 v16以上版本集成菜单安装:Excel 加载项 ==> 启用StatPlusMacAddin |(回到Blog入口)| (回到首页) [再编辑]
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
网络营销实战密码
昝辉Zac / 电子工业出版社 / 2009.1 / 56.00元
本书是作者几年来网络营销实战的总结,与其他网络营销书籍最大不同之处是:只专注于实战,不谈理论。本书分三部分详细介绍了网络营销实用策略和技巧,并分析了大量实战案例。第一部分介绍市场与产品研究,包括用户、市场和竞争对手的调查;产品、目标市场的确定;价格策略;赢利模式等。第二部分讨论以网络营销为导向的网站设计,包括怎样在网站上卖东西、提高转化率,以及网站目标设定等。第三部分研究怎样给网站带来流量,详细讨......一起来看看 《网络营销实战密码》 这本书的介绍吧!