HELP!...geo::ip module for awstats won't work
Author Message
HELP!...geo::ip module for awstats won't work

SOFTWARE: Awstats 5.4 and ActivePERL 5.8.0

PROBLEM:
Error: Plugin load for plugin 'geoip' failed with return code: Error: Need Perl module Geo::IP

Setup ('C:\Inetpub\wwwroot\cgi-bin\awstats.w3svc.conf' file, web server or permissions) may be wrong.
See AWStats documentation in 'docs' directory for informations on how to setup awstats.

AWSTATS DOCUMENTATION:
Version : 5.0 +

# Plugin files must be .pm files stored in 'plugins' directory.
# Uncomment LoadPlugin lines to enable a plugin after checking that plugin
# required perl modules are installed.

# Plugin: PluginName
# PluginName description
# Perl modules required: ...
#

COMMENTS: The 'geoip.pm' file is stored in the 'plugins' directory. I assume that 'geoip.pm' needs to be installed using PPM. I've read the activePERL documentation, as well as other documentation on the web, and I can't figure out how to do this.  I've tried copying 'geoip.pm' to the PERL 'lib' directory and the Awstats 'lib' directory. I've also tried designating the 'plugins' directory as a repository and searching for the module with no luck.

NOTE: This is NOT the geo::ipfree module.

Mon, 22 Aug 2005 08:04:28 GMT
HELP!...geo::ip module for awstats won't work
[ .. ]

Quote:
>COMMENTS: The 'geoip.pm' file is stored in the 'plugins' directory.
>assume that 'geoip.pm' needs to be installed using PPM. I've read the
>activePERL documentation, as well as other documentation on the web, and
>I can't figure out how to do this.  I've tried copying 'geoip.pm' to the
>PERL 'lib' directory and the Awstats 'lib' directory. I've also tried
>designating the 'plugins' directory as a repository and searching for
>the module with no luck.

Geo::IP is an xs-based module, which means that it needs a
C compiler to build. We have a ppm package of it for Win32
at http://theoryx5.uwinnipeg.ca/ppms/, for ActivePerl 8xx
builds, and at http://theoryx5.uwinnipeg.ca/ppmpackages/,
for 6xx builds.

--
best regards,
randy kobes

Tue, 23 Aug 2005 23:33:39 GMT
HELP!...geo::ip module for awstats won't work
I have the same problem too.
I tried to follow Randy's suggestions, but I don't know how to handle the
files (I never used PERL, just installed it to get Awstats work).
If you succeed, could you please post the exact steps?

Enrico.

P.S. is any chance to have IPfree work? (just in case...)

Wed, 24 Aug 2005 22:52:49 GMT
HELP!...geo::ip module for awstats won't work

Quote:

>I have the same problem too.
>I tried to follow Randy's suggestions, but I don't know how to handle the
>files (I never used PERL, just installed it to get Awstats work).
>If you succeed, could you please post the exact steps?

Assuming you installed ActivePerl, it's probably worthwhile
to spend some time going over the documentation for PPM that's
included in the distribution. Installing the Geo-IP ppm package
basically goes like
C:\> ppm install http://theoryx5.uwinnipeg.ca/ppms/Geo-IP.ppd
for ActivePerl 8xx, and
C:\> ppm install http://theoryx5.uwinnipeg.ca/ppmpackages/Geo-IP.ppd
for 6xx builds.

--
best regards,
randy kobes

Thu, 25 Aug 2005 00:08:21 GMT
HELP!...geo::ip module for awstats won't work

Hi Randy,

Quote:
>  C:\> ppm install http://theoryx5.uwinnipeg.ca/ppms/Geo-IP.ppd

contains only a html page, I expected a .ppm file.

So I did the command you suggested:
C:\> ppm install http://theoryx5.uwinnipeg.ca/ppms/Geo-IP.ppd

And actually the package was installed.
(I expected the package to be installed in the lib directory instead of the
site/lib. What's the difference?)

Now, running Awstats with geoip activated, I receive the following message:

Can't call method "country_code_by_addr" on an undefined value at
C:\Inetpub\Scr
ipts\plugins/geoip.pm line 77, <LOG> line 7.

Any clues? Maybe it's an Awstats problem

Thanks,

Enrico.

Thu, 25 Aug 2005 01:49:28 GMT
HELP!...geo::ip module for awstats won't work

Quote:

> Hi Randy,
> >  C:\> ppm install http://theoryx5.uwinnipeg.ca/ppms/Geo-IP.ppd
> contains only a html page, I expected a .ppm file.

A .ppd file is a particular type of XML file describing the package.
There is no 'ppm' file per se.

Quote:
> So I did the command you suggested:
>  C:\> ppm install http://theoryx5.uwinnipeg.ca/ppms/Geo-IP.ppd

> And actually the package was installed.
> (I expected the package to be installed in the lib directory instead of
the
> site/lib. What's the difference?)

that Perl uses to find modules. site/lib is the default location for
3rd-party modules.

Quote:
> Now, running Awstats with geoip activated, I receive the following
message:
> Can't call method "country_code_by_addr" on an undefined value at
> C:\Inetpub\Scripts\plugins/geoip.pm line 77, <LOG> line 7.
> Any clues? Maybe it's an Awstats problem

That sounds particular to Awstats. To see if Geo::IP is working
OK, try the simple scripts described in the documentation:
C:\> perldoc Geo::IP
If you don't have a copy of the Geo::IP database, you can
get it from http://www.maxmind.com/.

best regards,
randy

Thu, 25 Aug 2005 10:38:24 GMT
HELP!...geo::ip module for awstats won't work

Quote:
> > Now, running Awstats with geoip activated, I receive the following
> message:
> > Can't call method "country_code_by_addr" on an undefined value at
> > C:\Inetpub\Scripts\plugins/geoip.pm line 77, <LOG> line 7.
> > Any clues? Maybe it's an Awstats problem

> That sounds particular to Awstats. To see if Geo::IP is working
> OK, try the simple scripts described in the documentation:
>    C:\> perldoc Geo::IP
> If you don't have a copy of the Geo::IP database, you can
> get it from http://www.maxmind.com/.

Ok, I downloaded the geoip database, and searched all over the internet
where I have to install it, and I didn't find a clue.

So I built a boh2.pl perl file just to test the function:

use Geo::IP;
my $gi = Geo::IP->new(GEOIP_STANDARD); print$gi->country_name_by_name("amazon.com");

And when running it I got the magic explanation:

C:\>boh2.pl
C:\Windows\SYSTEM32Error Opening file C:\Windows\SYSTEM32\GeoIP.dat
Can't call method "country_name_by_name" on an undefined value at
C:\boh2.pl lin
e 4.

So it looks like it must be installed into the C:\Windows\SYSTEM32
directory, that actually doesn't exist, because I'm running on Win2000.
So isn't an AWStats problem, but a Perl one.

I created the C:\Windows\SYSTEM32 directory, and placed the file there, and
calling boh2.pl I got the response:

C:\>boh2.pl
C:\Windows\SYSTEM32United States
C:\>

It seems like it's working. BUT my doubts are:

1) I expected an output like "United States" instead of
"C:\Windows\SYSTEM32United States". But Awstats seems to work happily, and

2) It seems that in the unix systems the geoip database must be placed in
/usr/local/share/GeoIP/GeoIP.dat, and that in Win2000 the same location is
C:\Windows\SYSTEM32. How can I modify the program to work with the WINNT
directory? I don't like to have a dummy Windows directory in my PC.

Thanks a lot!

Enrico.

Fri, 26 Aug 2005 01:23:35 GMT
HELP!...geo::ip module for awstats won't work
[snip]

Quote:
> So it looks like it must be installed into the C:\Windows\SYSTEM32
> directory, that actually doesn't exist, because I'm running on Win2000.

as am I.

[snip]

Quote:
> 1) I expected an output like "United States" instead of
> "C:\Windows\SYSTEM32United States". But Awstats seems to work happily, and

dunno...not familiar with this module or it's syntax

[snip]

Quote:
> 2) It seems that in the unix systems the geoip database must be placed in
> /usr/local/share/GeoIP/GeoIP.dat, and that in Win2000 the same location is
> C:\Windows\SYSTEM32. How can I modify the program to work with the WINNT
> directory? I don't like to have a dummy Windows directory in my PC.

perhaps you could take a look at GeoIP.dat and replace all instances of
"Windows" with "winnt"?

Hope this helps,
Drew

Fri, 26 Aug 2005 02:11:51 GMT
HELP!...geo::ip module for awstats won't work

Quote:
> > 2) It seems that in the unix systems the geoip database must be placed
in
> > /usr/local/share/GeoIP/GeoIP.dat, and that in Win2000 the same location
is
> > C:\Windows\SYSTEM32. How can I modify the program to work with the WINNT
> > directory? I don't like to have a dummy Windows directory in my PC.

> perhaps you could take a look at GeoIP.dat and replace all instances of
> "Windows" with "winnt"?

I tried, but doing a grep the only place where the Windows/system32 appears
is into IP.dll.
Should I submit a kind of bug report?

Fri, 26 Aug 2005 02:38:04 GMT
HELP!...geo::ip module for awstats won't work

Quote:
> Assuming you installed ActivePerl, it's probably worthwhile
> to spend some time going over the documentation for PPM that's
> included in the distribution. Installing the Geo-IP ppm package
> basically goes like
>  C:\> ppm install http://theoryx5.uwinnipeg.ca/ppms/Geo-IP.ppd
> for ActivePerl 8xx, and

Ok, let's go for the final step: so far I played with my PC, but now I have
to install the GeoIP on my web server, that is locked out from web surfing
for safety reasons.

How can I install the package without accessing the internet?
install the package.

Ciao!

E.

Fri, 26 Aug 2005 03:06:29 GMT
HELP!...geo::ip module for awstats won't work

[ .. ]

Quote:
> 2) It seems that in the unix systems the geoip database must be placed in
> /usr/local/share/GeoIP/GeoIP.dat, and that in Win2000 the same location is
> C:\Windows\SYSTEM32. How can I modify the program to work with the WINNT
> directory? I don't like to have a dummy Windows directory in my PC.

Where to place GeoIP.dat on Win32 is set at the time the
C library was compiled, so can't be changed easily on the
Perl side. I'll look at trying to make it configurable via
an environment variable. In the meantime, you might try
creating (or editing) a registry entry HKEY_LOCAL_MACHINE ->
Software -> MaxMind ->GeoIP -> DATADIR to point
to the directory you would like to place GeoIP.dat in.

best regards,
randy

Fri, 26 Aug 2005 03:14:08 GMT
HELP!...geo::ip module for awstats won't work
Just to say that yes, I have found the file Geo-IP.tar.gz, but I don't know
how to use it.
Just not to left any option out, I tried:

ppm install Geo-IP.tar.gz

but of course it didn't work.
I also unpacked the files in a temp directory, but there is no .ppm file.
Sorry, I'm only a user!

E.

Fri, 26 Aug 2005 03:39:23 GMT
HELP!...geo::ip module for awstats won't work

Quote:
> Just to say that yes, I have found the file Geo-IP.tar.gz, but I don't
know
> how to use it.
> Just not to left any option out, I tried:

> ppm install Geo-IP.tar.gz

> but of course it didn't work.
> I also unpacked the files in a temp directory, but there is no .ppm file.
> Sorry, I'm only a user!

The documentation that comes with ActivePerl has a really
good section on using PPM, both locally and over the net.

In brief, to use ppm locally, edit the HREF attribute of the
CODEBASE tag of the .ppd file to reflect where you put
the .tar.gz file on your system. Then run, in the directory
where the .ppd file is,
ppm install WhatEver-TheName-Is.ppd

best regards,
randy kobes

Fri, 26 Aug 2005 08:28:22 GMT
HELP!...geo::ip module for awstats won't work

[ .. ]

Quote:
> Ok, let's go for the final step: so far I played with my PC, but now I
have
> to install the GeoIP on my web server, that is locked out from web surfing
> for safety reasons.

> How can I install the package without accessing the internet?
> install the package.

You're in luck - the documentation within perlfaq8
('perldoc perlfaq8') has an entry on how to keep your
own module or library directory, and then how to use it.

For an XS-based module like Geo::IP that needs a C compiler
to build, in theory you can, if you know what you're doing, copy
the files made up on one machine over to another, *if* the two
machines use the same operating system, have used the same
compiler for Perl and the module you've built, and are running
compatible Perl versions.

best regards,
randy kobes

Fri, 26 Aug 2005 08:42:46 GMT
HELP!...geo::ip module for awstats won't work

Quote:

> > Assuming you installed ActivePerl, it's probably worthwhile
> > to spend some time going over the documentation for PPM that's
> > included in the distribution. Installing the Geo-IP ppm package
> > basically goes like
> >  C:\> ppm install http://theoryx5.uwinnipeg.ca/ppms/Geo-IP.ppd
> > for ActivePerl 8xx, and

> Ok, let's go for the final step: so far I played with my PC, but now I
> have to install the GeoIP on my web server, that is locked out from
> web surfing for safety reasons.

> How can I install the package without accessing the internet?

http://theoryx5.uwinnipeg.ca/ppms/Geo-IP.ppd file and put it on a disk.

Then, stick the disk in other machine, and copy the .ppd file onto the
harddrive.

Then, do
C:\> ppm install C:\path\to\Geo-IP.ppd

Quote:
> and install the package.

Indeed.

Fri, 26 Aug 2005 12:05:00 GMT

 Page 1 of 2 [ 19 post ] Go to page: [1] [2]

Relevant Pages