Installing Geo::IP::PurePerl

This section is where GeoLite users can find support from other users.

Installing Geo::IP::PurePerl

Postby Netmaster » Fri Dec 09, 2005 8:21 pm

Hi
My setup : Windows 2003 Server, running Apache, PHP, ActiveState Perl 5.8.7 Build 815, AWStats 6.4 (build 1.814)

My ultimate goal is to run awstats with GeoIP for country, ISP and region lookups.

I read within awstats that in order to use the free GeoIP module that I need to have the Geo::IP or Geo::IP::PurePerl Perl modules installed - I read the part on the site that says that you need to have the GeoIP C Library or Geo::IP::PurePerl installed in order for Geo::IP to run correctly. Not having a compiler (and no DLL's readily available) I decided to go down the PurePerl route.

After downloading the Geo::IP::PurePerl 1.17 source and grabbing Microsoft's free nmake15.exe to compile with, I went through the Makefile.pl, nmake, nmake test and nmake install and (to my amazement) I didn't get any errors. It even downloaded the GeoIP.dat file to c:\program files\GeoIP. So I assume that PurePerl is compiled ok now.

When I use the PPM utility to query my Perl installation, PurePerl doesn't appear in the list of installed modules. I believe this may be because PPM didn't install the module, which makes sense, so a manual install of the module needs to be undertaken?

It's at this point that I'm stuck.

I see that in the folder where I ran the nmake's, I now have an additional blib and t folder. From what I've gathered on the internet, the t folder can be ignored as it contains the results of tests. Fair enough. The blib however is screaming 'binary library' folder at me for some reason, but I'm not too sure what to do with it. It certainly seems to be something that I've (n)made!


I'm wondering if there's some files that I need to have copied over into my Perl distribution folder, but I'm not sure which ones to move and where to put them.

Can anyone give me some guidance here?



Dave
Netmaster
 
Posts: 2
Joined: Fri Dec 09, 2005 6:18 pm

Postby Netmaster » Fri Dec 09, 2005 11:42 pm

A follow up to this, if it's at all helpful :

  1. Download the TAR'd PurePerl from this site (www.maxmind.com)
  2. Extract using WinZip
  3. Open \lib\Geo\IP\PurePerl.pm
  4. Search file for GeoIP.dat - there should be two hits, both used when declaring the $db_file variable
  5. Replace the Unix style location of file with windows version (eg
    Code: Select all
    $db_file = '/usr/local/share/GeoIP/GeoIP.dat'
    with
    Code: Select all
    $db_file = 'c:/program files/GeoIP/GeoIP.dat'
    (or similar, depending on where your GeoIP.dat file is located)
  6. Open \t\1_lookup.t
  7. Replace the location of the GeoIP.dat file in the second argument as mentiond above
    Code: Select all
    foreach my $file ("GeoIP.dat",'c:/program files/GeoIP/GeoIP.dat') {
  8. Repeat above with \t\2_namelookup.t
  9. Now run perl Makefile.pl
  10. nmake
  11. nmake test
  12. nmake install

Use ppm to install the Geo-IP Perl module (as indicated on the API download section of this site)

Check that everything works ok, with your own test:

create a test.t file with the following
Code: Select all
use Geo::IP;

my $gi = Geo::IP->new(GEOIP_STANDARD);
print $gi->country_name_by_name("www.3dwg.com");


and then run perl test.t and view the results.


Now - all that needs work on is getting AWStats plugin to stop bailing out on me... ;)
Netmaster
 
Posts: 2
Joined: Fri Dec 09, 2005 6:18 pm

A few months later...

Postby monko » Wed Aug 15, 2007 7:19 pm

Netmaster/ or anyone else,

the posting below helped get me so far, but now I am still getting a CGI error:

"The specified CGI application misbehaved by not returning a complete set of HTTP headers."

Any chance you figured out how to completely make this plug in work? I am running IIS 6. This error only shows up when I enabled the GEOIP plugin.

Thanks and hope someone is still following this post!
monko
 
Posts: 1
Joined: Wed Aug 15, 2007 7:14 pm

Re: A few months later...

Postby mshe » Wed Oct 31, 2007 4:12 pm

monko wrote:Netmaster/ or anyone else,



"The specified CGI application misbehaved by not returning a complete set of HTTP headers."


did you uninstall the geoip plugin?

Run PPM... then find the geoip plugin. Remove the GeoIP plugin.

Once the plugin is removed, AWStats will default to the PurePerl module :-)
mshe
 
Posts: 3
Joined: Wed Oct 31, 2007 4:10 pm

Postby jollygoodlad » Fri Jan 18, 2008 12:11 am

Hi All,

I've been trying to tackle installing GeoIP PurePerl and I've been pulling
out my hair! I've gotten as far as successfully running test.t and getting
back "Russian Federation" as a response so I know the install works.
Though when I try to pull up the stats in a browser, it generates the
following error:

Error: Plugin load for plugin 'geoip' failed with return code: Error: Can't locate C:/Inetpub/wwwroot/Sites/AWStats/cgi-bin/Geo/IP.pm in @INC (@INC contains: C:/Perl/site/lib C:/Perl/lib . C:\Inetpub\wwwroot\Sites\AWStats\cgi-bin/lib C:\Inetpub\wwwroot\Sites\AWStats\cgi-bin/plugins) at (eval 2) line 1. Can't locate C:/Inetpub/wwwroot/Sites/AWStats/cgi-bin/Geo/IP/PurePerl.pm in @INC (@INC contains: C:/Perl/site/lib C:/Perl/lib . C:\Inetpub\wwwroot\Sites\AWStats\cgi-bin/lib C:\Inetpub\wwwroot\Sites\AWStats\cgi-bin/plugins) at (eval 3) line 1. Error: Need Perl module Geo::IP or Geo::IP::PurePerl


I've tried setting the relative and absolute paths to the modules, but the
same errors still laugh at me. Any help/hints?

Link: http://stats.jollygoodlad.com/cgi-bin/a ... oodlad.com
Environment: Windows 2003, IIS 6, AWStats 6.7, ActivePerl 5.10
jollygoodlad
 
Posts: 1
Joined: Thu Jan 17, 2008 10:25 pm

Postby 0amaxpower » Wed May 14, 2008 6:21 am

jollygoodlad wrote:Hi All,

I've been trying to tackle installing GeoIP PurePerl and I've been pulling
out my hair! I've gotten as far as successfully running test.t and getting
back "Russian Federation" as a response so I know the install works.
Though when I try to pull up the stats in a browser, it generates the
following error:

Error: Plugin load for plugin 'geoip' failed with return code: Error: Can't locate

C:/Inetpub/wwwroot/Sites/AWStats/cgi-bin/Geo/IP.pm in @INC (@INC contains: C:/Perl/site/lib

C:/Perl/lib . C:\Inetpub\wwwroot\Sites\AWStats\cgi-bin/lib

C:\Inetpub\wwwroot\Sites\AWStats\cgi-bin/plugins) at (eval 2) line 1. Can't locate

C:/Inetpub/wwwroot/Sites/AWStats/cgi-bin/Geo/IP/PurePerl.pm in @INC (@INC contains:

C:/Perl/site/lib C:/Perl/lib . C:\Inetpub\wwwroot\Sit
es\AWStats\cgi-bin/lib

C:\Inetpub\wwwroot\Sites\AWStats\cgi-bin/plugins) at (eval 3) line 1. Error: Need Perl

module Geo::IP or Geo::IP::PurePerl


I've tried setting the relative and absolute paths to the modules, but the
same errors still laugh at me. Any help/hints?

Link: http://stats.jollygoodlad.com/cgi-bin/a ... oodlad.com
Environment: Windows 2003, IIS 6, AWStats 6.7, ActivePerl 5.10


I've met the same problem with jollygoodlad. How to solve it? Any 1 help?
0amaxpower
 
Posts: 1
Joined: Wed May 14, 2008 6:08 am

Postby ZeroC0ol » Fri Jun 06, 2008 12:23 am

Code: Select all
perl Makefile.pl
Writing Makefile for Geo::IP::PurePerl

nmake
'nmake' is not recognized as an internal or external command, operatable program or batch file.


help? I can't get he nmake command running
t_T
ZeroC0ol
 
Posts: 5
Joined: Fri Jun 06, 2008 12:19 am

Postby ZeroC0ol » Sat Jun 07, 2008 4:28 am

no help or what ?
t_T
ZeroC0ol
 
Posts: 5
Joined: Fri Jun 06, 2008 12:19 am

Postby borisz_maxmind » Sat Jun 07, 2008 2:01 pm

Hi ZeroCool,

I do not use windows myself, but it looks nmake is not installed on your system.

As far as I know you can download it from MS for free.
--
boris
borisz_maxmind
 
Posts: 475
Joined: Tue Mar 18, 2008 7:51 pm

Postby ZeroC0ol » Sat Jun 07, 2008 3:00 pm

borisz_maxmind wrote:Hi ZeroCool,

I do not use windows myself, but it looks nmake is not installed on your system.

As far as I know you can download it from MS for free.


Thanks bro never thought about it, really helpful, I will try installing now t-T
t_T
ZeroC0ol
 
Posts: 5
Joined: Fri Jun 06, 2008 12:19 am

Postby ZeroC0ol » Sat Jun 07, 2008 11:23 pm

Help... again... now another error:

the ppm install command, I tried for 6xx and 8xx

but error I get:
ppm install failed: The PPD does not provide the code to install for this platform
t_T
ZeroC0ol
 
Posts: 5
Joined: Fri Jun 06, 2008 12:19 am

Postby borisz_maxmind » Sun Jun 08, 2008 7:24 pm

hi Zerocool,

Sounds you use perl 5.10.

6xx is for perl 5.6 only
8xx is only for perl 5.8

Take a look at the ppm faq at activestate.com.

But to use Geo::IP::Pureperl, Geo::IP is not needed, It works just slower.
--
boris
borisz_maxmind
 
Posts: 475
Joined: Tue Mar 18, 2008 7:51 pm

Postby ZeroC0ol » Mon Jun 09, 2008 12:19 am

thx, I hope that will fix it, I'm having trouble finding higher version, but I'll search better, maybe its not free?
t_T
ZeroC0ol
 
Posts: 5
Joined: Fri Jun 06, 2008 12:19 am

Postby solitude » Sat Nov 01, 2008 4:51 am

Help... again... now another error:

the ppm install command, I tried for 6xx and 8xx

but error I get:
ppm install failed: The PD does not provide the code to install for this platform


Dear check your plug ins. I think there is some problem with your plug ins. I work in a software house and face these type of errors daily. Some time a little mistake occur and we could not correct it. Check your scripts, versions compatibility and also browsers. If your problem will solve than nothing but if not than i will ask some body in my software house.

waiting . . .
solitude
 
Posts: 1
Joined: Sat Nov 01, 2008 4:25 am

Postby Raudi » Mon Feb 02, 2009 6:56 pm

Hello,

i have some problems with installing this module too.

I already installed Active Perl 5.10 and AWStats 6.9 is running on a Windows 2003 Server with IIS.

Now i downloaded Geo IP PurePerl 1.23 and made the steps from the article above.

When i start the PPM the PurePerl is already installed but when i try the test.t script i got only:

Can't locate object method "new" via package "Geo::IP" at test.t line 3.

What can i do?
Raudi
 
Posts: 1
Joined: Mon Feb 02, 2009 6:47 pm

Next

Return to GeoLite Support

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron