Allow nested include for perl version >= 5.6
AWStats Log Analyzer
Brought to you by:
eldy,
manolamancha
Hi!
Awstats (6.3) it's cool but I like to use the recursive include.
I have Debian Sarge with Perl 5.8.
Awstats warning the following line:
Warning: Perl versions before 5.6 cannot handle nested includes
I comment out the 1158-1161 lines from awstats.pl and it's
working perfectly. I know it's not a beautiful key, but it's work.
I'm not perfect in perl but a mind you can get the perl version,
and only use this warning if perl version less from 5.6.
Sorry, I not perfect in english.
Thx, Zsalab!
Logged In: YES
user_id=1224539
Sorry not recursive, nedted.
Logged In: YES
user_id=960750
Check the last line of both files - are they including each
other, or themselves?
Logged In: YES
user_id=1224539
I like use include in included config file.
I have the followin files:
awstats.conf
this is include the awstats.conf.local
awstats.conf.local
this is no include other file
awstats.vhost1.conf
awstats.vhost2.conf
...
this are includes the awstats.conf
I like use the new maintrainer version of config file (awstats.conf),
and override some property in awstats.conf.local.
I want to use the base config (maintrainer and my) in virtualhost config files.
Logged In: YES
user_id=1224539
I replaced the expression in following lines (1158-1161) in awstats.pl
I'm not a perl programmer, but it's working.
I dont know it's cool or bad solution.
if ($level > 1) {
warning("Warning: Perl versions before 5.6 cannot handle nested includes");
next;
}
to
if (( $] < 5.006 ) && ($level > 1)) {
warning("Warning: Perl versions before 5.6 cannot handle nested includes");
next;
}
Logged In: YES
user_id=207643
I have exactly the same request and corrected it the same
way remove the 2 lines:
warning("Warning: Perl versions before 5.6 cannot
handle nested includes");
next;
This "BUG" is present since several versions, why such
simple thing is not corrected?
HINT: if oyu want to not touch the maintainer version, do it
the debian way, include at the end of awstats.conf a file
awstats.local.conf where you will put your common
definitions (e.g. language...)
And then for all your virtual hosts, first include in each
conf file the awstats.conf and then set specific vars for
that host.
very easy config, and that's why I need the nested includes
to work
Logged In: YES
user_id=207643
to patch (if your awstats.pl is in /usr/lib/cgi-bin/):
perl -pi -e 's/\Qif (\E\$\Qlevel > 1) {\E/if (( \$] < 5.006
) && (\$level > 1)) {/' /usr/lib/cgi-bin/awstats.pl
Logged In: YES
user_id=838923
Bug 1408271 explains why this fix is insufficient.
Logged In: YES
user_id=1023839
Originator: NO
Same problem here
Running Ubuntu Edgy with Awstats 6.5-2ubuntu1 But i can't comment out the 1158-1161 because the script looks different.
Any issue ?
The same issue happens using latest stable 6.9 version on Windows with ActivePerl v5.10
Is this going to be fixed in next version?
Thank you.
Debian patch:
http://git.debian.org/?p=collab-maint/awstats.git;a=blob;f=debian/patches/1004_perl_version.patch
The request was closed because date is old.
Problem might be fixed or patch may be obsolete.
If this is not true, please resubmit the request.