Hi when I installed BAWStats in the configuration page I set paths. I submit my settings and it return error when it parse some file.

( ! ) Parse error: syntax error, unexpected T_DOUBLE_ARROW, expecting ')' in /var/www/localhost/sites/all/modules/bawstats/engine/data.inc.php(243) : eval()'d code on line 1877

I setup debug mode:

BetterAWstats Error
There was an error parsing the awstats library file /home/awstats/awstats/wwwroot/cgi-bin/lib/robots.pm that is used to parse the variable RobotsHashIDLib. Please switch on debugging in config.php and post the PHP errors displayed to the support forum so the problem can be fixed.

dbg_detect_language | Memory used: 63.8939 MB | Time: 1'369'262'049.806 sec
dbg_detected_language | Memory used: 63.8948 MB | Time: 1'369'262'049.806 sec
reading language data: /home/awstats/awstats/wwwroot/cgi-bin/lang/awstats-en.txt | Memory used: 63.8954 MB | Time: 1'369'262'049.806 sec
finished reading language data | Memory used: 63.9927 MB | Time: 1'369'262'049.807 sec
Trying to read library data (OSHashLib) from file: /home/awstats/awstats/wwwroot/cgi-bin/lib/operating_systems.pm | Memory used: 64.4081 MB | Time: 1'369'262'049.811 sec
Trying to read library data (DomainsHashIDLib) from file: /home/awstats/awstats/wwwroot/cgi-bin/lib/domains.pm | Memory used: 64.4369 MB | Time: 1'369'262'049.813 sec
Trying to read library data (RobotsHashIDLib) from file: /home/awstats/awstats/wwwroot/cgi-bin/lib/robots.pm | Memory used: 64.5105 MB | Time: 1'369'262'049.814 sec
Trying to read library data (Array) from file: /home/awstats/awstats/wwwroot/cgi-bin/lib/worms.pm | Memory used: 65.1555 MB | Time: 1'369'262'049.818 sec
Trying to read library data (Array) from file: /home/awstats/awstats/wwwroot/cgi-bin/lib/mime.pm | Memory used: 65.1597 MB | Time: 1'369'262'049.818 sec
Trying to read library data (Array) from file: /home/awstats/awstats/wwwroot/cgi-bin/lib/browsers.pm | Memory used: 65.2972 MB | Time: 1'369'262'049.820 sec
Trying to read library data (SearchEnginesHashLib) from file: /home/awstats/awstats/wwwroot/cgi-bin/lib/search_engines.pm | Memory used: 65.4015 MB | Time: 1'369'262'049.822 sec
Trying to read library data (httpcodelib) from file: /home/awstats/awstats/wwwroot/cgi-bin/lib/status_http.pm | Memory used: 65.4769 MB | Time: 1'369'262'049.826 sec

I used awstats Last stable version 7.1.1 - 2013-03-08 20:19

Comments

marinex’s picture

Issue summary: View changes

little edits

marinex’s picture

Status: Active » Needs review

So I found where is the bug. It is in the robots.pm at the awstats. There is a line:

'google[_+ ]web[_+ ]preview',=>'Google',

and I think it should be:

'google[_+ ]web[_+ ]preview'=>'Google',

egfrith’s picture

Thanks for your report. Do you think this is valid perl? If not, this is an awstats bug. If so, I suppose the bawstats parser will have to be modified.

marinex’s picture

I think my fix is valid perl, because parsing dates from robots.pm is now OK and this is awstats bug. It need to send this report to awstats.

egfrith’s picture

I think your fix is valid perl, but I was wondering about the orginal. If it is valid perl, then it could be the very simple parser which is build into the bawstats module that is at fault. If it is not valid perl, would you be report to the awstats team?

marinex’s picture

Hi, I sent this issue to awstats and it should be fixed in dev branch of awstats.
Link Bug in the robots.pm
Here is e-mail from Laurent Destailleur (Eldy) (eldy at users.sf.net):
Right.
Fixed into dev branch

marinex’s picture

Issue summary: View changes

again

egfrith’s picture

Title: Parse error: syntax error, unexpected T_DOUBLE_ARROW, expecting ')'... » AWStats 7.1 Parse error: syntax error, unexpected T_DOUBLE_ARROW, expecting ')'...
Status: Needs review » Fixed

As the AWStats is now at version 7.3, I'm marking this issue as fixed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.