# PARAMETERS: [GEOIP_STANDARD | GEOIP_MEMORY_CACHE] [/pathto/geoip.dat] </pathto/override.txt>
# DESCRIPTION: Builds a country chart and adds an entry to the hosts
# table with country name
+# Replace spaces in the path of geoip data file with string "%20".
#
#LoadPlugin="geoip GEOIP_STANDARD /pathto/GeoIP.dat"
# PARAMETERS: [GEOIP_STANDARD | GEOIP_MEMORY_CACHE] [/pathto/GeoIPCity.dat] </pathto/override.txt>
# DESCRIPTION: This plugin adds a column under the hosts field and tracks the pageviews
# and hits by city including regions.
+# Replace spaces in the path of geoip data file with string "%20".
#
#LoadPlugin="geoip_city_maxmind GEOIP_STANDARD /pathto/GeoIPCity.dat"
# This plugin can display some ISP information if included in the database. You can also provide
# a link that will be used to lookup additional registration data. Put the link at the end of
# the parameter string and the report page will include the link with the full AS number at the end.
+# Replace spaces in the path of geoip data file with string "%20".
#
#LoadPlugin="geoip_asn_maxmind GEOIP_STANDARD /usr/local/geoip.dat http://enc.com.au/itools/aut-num.php?autnum="
# PARAMETERS: [GEOIP_STANDARD | GEOIP_MEMORY_CACHE] [/pathto/GeoIPRegion.dat]
# DESCRIPTION:This plugin adds a chart of hits by regions. Only regions for US and
# Canada can be detected.
+# Replace spaces in the path of geoip data file with string "%20".
#
#LoadPlugin="geoip_region_maxmind GEOIP_STANDARD /pathto/GeoIPRegion.dat"
# REQUIRED MODULES: Geo::IP or Geo::IP::PurePerl (from Maxmind)
# PARAMETERS: [GEOIP_STANDARD | GEOIP_MEMORY_CACHE] [/pathto/GeoIPISP.dat]
# DESCRIPTION: This plugin adds a chart of hits by ISP.
+# Replace spaces in the path of geoip data file with string "%20".
#
#LoadPlugin="geoip_isp_maxmind GEOIP_STANDARD /pathto/GeoIPISP.dat"
# REQUIRED MODULES: Geo::IP or Geo::IP::PurePerl (from Maxmind)
# PARAMETERS: [GEOIP_STANDARD | GEOIP_MEMORY_CACHE] [/pathto/GeoIPOrg.dat]
# DESCRIPTION: This plugin add a chart of hits by Organization name
+# Replace spaces in the path of geoip data file with string "%20".
#
#LoadPlugin="geoip_org_maxmind GEOIP_STANDARD /pathto/GeoIPOrg.dat"
# Other possible directories : "/usr/local/etc/awstats", "/etc"
# FHS standard, Suse package : "/etc/opt/awstats"
my $configdir = shift;
- my @PossibleConfigDir = ();
+ my @PossibleConfigDir = (
+ "$DIR",
+ "/etc/awstats",
+ "/usr/local/etc/awstats", "/etc",
+ "/etc/opt/awstats"
+ );
if ($configdir) {
# If from CGI, overwriting of configdir is only possible if AWSTATS_ENABLE_CONFIG_DIR defined
if ($ENV{'GATEWAY_INTERFACE'} && ! $ENV{"AWSTATS_ENABLE_CONFIG_DIR"})
{
- error("Sorry, to allow overwriting of configdir parameter from an AWStats CGI usage, environment variable AWSTATS_ENABLE_CONFIG_DIR must be set to 1. For example, by adding the line 'SetEnv AWSTATS_ENABLE_CONFIG_DIR 1' in your Apache config file or into a .htaccess file.");
+ error("Sorry, to allow overwriting of configdir parameter, from an AWStats CGI page, with a non default value, environment variable AWSTATS_ENABLE_CONFIG_DIR must be set to 1. For example, by adding the line 'SetEnv AWSTATS_ENABLE_CONFIG_DIR 1' in your Apache config file or into a .htaccess file.");
}
else
{
@PossibleConfigDir = ("$configdir");
}
}
- else {
- @PossibleConfigDir = (
- "$DIR", "/etc/awstats",
- "/usr/local/etc/awstats", "/etc",
- "/etc/opt/awstats"
- );
- }
# Open config file
$FileConfig = $FileSuffix = '';
debug(" Plugin $PluginName: InitParams=$InitParams",1);
my ($mode,$datafile,$override,$link)=split(/\s+/,$InitParams,4);
if (! $datafile) { $datafile="GeoIPASNum.dat"; }
+ else { $datafile =~ s/%20/ /g; }
if ($type eq 'geoippureperl') {
# With pureperl with always use GEOIP_STANDARD.
# GEOIP_MEMORY_CACHE seems to fail with ActiveState
else { $mode=Geo::IP::GEOIP_STANDARD(); }
}
# if there is a url in the override field, move it to link
- if (lc($override) =~ m/^http/){$link = $override;}
- else{$OverrideFile = $override;}
+ if (lc($override) =~ m/^http/) { $link = $override; }
+ elsif ($override) { $override =~ s/%20/ /g; $OverrideFile=$override; }
if ($link){$LookupLink=$link;}
debug(" Plugin $PluginName: GeoIP initialized type=$type mode=$mode, link=$link",1);
if ($type eq 'geoippureperl') {
debug(" Plugin $PluginName: InitParams=$InitParams",1);
my ($mode,$datafile,$override)=split(/\s+/,$InitParams,3);
if (! $datafile) { $datafile="GeoIPCity.dat"; }
+ else { $datafile =~ s/%20/ /g; }
if ($type eq 'geoippureperl') {
# With pureperl with always use GEOIP_STANDARD.
# GEOIP_MEMORY_CACHE seems to fail with ActiveState
if ($mode eq '' || $mode eq 'GEOIP_MEMORY_CACHE') { $mode=Geo::IP::GEOIP_MEMORY_CACHE(); }
else { $mode=Geo::IP::GEOIP_STANDARD(); }
}
- if ($override){$OverrideFile=$override;}
+ if ($override){ $override =~ s/%20/ /g; $OverrideFile=$override; }
%TmpDomainLookup=();
debug(" Plugin $PluginName: GeoIP initialized type=$type mode=$mode override=$override",1);
if ($type eq 'geoippureperl') {
debug(" Plugin $PluginName: InitParams=$InitParams",1);
my ($mode,$datafile,$override)=split(/\s+/,$InitParams,3);
if (! $datafile) { $datafile="GeoIPIsp.dat"; }
+ else { $datafile =~ s/%20/ /g; }
if ($type eq 'geoippureperl') {
# With pureperl with always use GEOIP_STANDARD.
# GEOIP_MEMORY_CACHE seems to fail with ActiveState
if ($mode eq '' || $mode eq 'GEOIP_MEMORY_CACHE') { $mode=Geo::IP::GEOIP_MEMORY_CACHE(); }
else { $mode=Geo::IP::GEOIP_STANDARD(); }
}
- if ($override){$OverrideFile=$override;}
+ if ($override){ $override =~ s/%20/ /g; $OverrideFile=$override; }
%TmpDomainLookup=();
debug(" Plugin $PluginName: GeoIP initialized type=$type mode=$mode",1);
if ($type eq 'geoippureperl') {
debug(" Plugin $PluginName: InitParams=$InitParams",1);
my ($mode,$datafile,$override)=split(/\s+/,$InitParams,3);
if (! $datafile) { $datafile="GeoIPOrg.dat"; }
+ else { $datafile =~ s/%20/ /g; }
if ($type eq 'geoippureperl') {
# With pureperl with always use GEOIP_STANDARD.
# GEOIP_MEMORY_CACHE seems to fail with ActiveState
if ($mode eq '' || $mode eq 'GEOIP_MEMORY_CACHE') { $mode=Geo::IP::GEOIP_MEMORY_CACHE(); }
else { $mode=Geo::IP::GEOIP_STANDARD(); }
}
- if ($override){$OverrideFile=$override;}
+ if ($override){ $override =~ s/%20/ /g; $OverrideFile=$override; }
%TmpDomainLookup=();
debug(" Plugin $PluginName: GeoIP initialized type=$type mode=$mode",1);
if ($type eq 'geoippureperl') {
debug(" Plugin $PluginName: InitParams=$InitParams",1);
my ($mode,$datafile,$override)=split(/\s+/,$InitParams,3);
if (! $datafile) { $datafile="GeoIPRegion.dat"; }
+ else { $datafile =~ s/%20/ /g; }
if ($type eq 'geoippureperl') {
- # With pureperl with always use GEOIP_STANDARD.
+ # With pureperl we always use GEOIP_STANDARD.
# GEOIP_MEMORY_CACHE seems to fail with ActiveState
if ($mode eq '' || $mode eq 'GEOIP_MEMORY_CACHE') { $mode=Geo::IP::PurePerl::GEOIP_STANDARD(); }
else { $mode=Geo::IP::PurePerl::GEOIP_STANDARD(); }
if ($mode eq '' || $mode eq 'GEOIP_MEMORY_CACHE') { $mode=Geo::IP::GEOIP_MEMORY_CACHE(); }
else { $mode=Geo::IP::GEOIP_STANDARD(); }
}
- if ($override){$OverrideFile=$override;}
+ if ($override){ $override =~ s/%20/ /g; $OverrideFile=$override; }
%TmpDomainLookup=();
debug(" Plugin $PluginName: GeoIP initialized type=$type mode=$mode",1);
if ($type eq 'geoippureperl') {