I received the following error when loading the page...

BetterAWstats Error
There was an error parsing the awstats library file /usr/share/awstats/lib/mime.pm that is used to parse the variable Array. Please switch on debugging in config.php and post the PHP errors displayed to the support forum so the problem can be fixed.

Please let me know if I can assist....

CommentFileSizeAuthor
#3 bawstats-956286-3.patch1.9 KBegfrith
error.txt91.86 KBhelmespc

Comments

XenoPhage’s picture

I'm receiving this same error. I've tracked this down to a change in the format of the mime.pm file distributed with awstats 7.x... It appears that the transformation from perl to php is failing.

If you replace the 7.x mime.pm with one from a 6.x version, it fixes the problem, but I'm not sure what it breaks in awstats itself.

egfrith’s picture

Assigned: Unassigned » egfrith

I have now looked at this (at last). It is indeed a problem with a change in format to mime.pm. I am working on a fix that will work for both AWStats 6.x and 7.x.

egfrith’s picture

StatusFileSize
new1.9 KB

I think I have now got a fix for this issue. The problem was twofold:
(a) baw_get_library() in engine/data.inc.php was unable to read the square brackets in the the new mime.pm
(b) The meaning of MimeHashLib and MimeHashFamily has changed between AWStats 6.x and 7.x. Also MimeHashIcon has disappeared.

The attached patch addresses both problems. The existing structure names are retained in the PHP code.

egfrith’s picture

Title: Error parsing the awstats library file » Error parsing AWStats 7.x library file
Status: Active » Fixed

I should add that the code now works for both 6.x and 7.x. If MimeHashIcon is empty, the 7.x code is invoked in library.inc.php.

This fix has now been committed http://drupalcode.org/project/bawstats.git/commit/b4dbfc4

Status: Fixed » Closed (fixed)

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