Solved

gentoo geoip installation

Posted on 2010-09-04
2
1,339 Views
Last Modified: 2012-05-10
Hi experts,
I try to install the geoip extension through SSH on my gentoo server.
I did:

> emerge Geo-IP

 : OK

> pecl install geoip

 : OK

> geoiplookup www.bbc.co.uk

: gives me
GeoIP Country Edition: GB, United Kingdom
GeoIP City Edition, Rev 1: GB, N7, Tadworth, (null), 51.283298, -0.233300, 0, 0
GeoIP City Edition, Rev 0: GB, N7, Tadworth, (null), 51.283298, -0.233300

Seems fine !
Now I try to add this as php extension:
I added

> extension=/usr/local/php5/lib/php/extensions/geoip.so

to php.ini

and restatred apache with

> /etc/init.d/apache restart


BUT my phpinfo() does not contain any geoip library and

> <?
> var_dump(geoip_record_by_name('88.191.127.8'));
> ?>

Gives me error: Call to undefined function geoip_record_by_name()

Can someone help me to install geoip on gentoo ?

Thanks

0
Comment
Question by:yarekGmail
2 Comments
 
LVL 12

Accepted Solution

by:
Rok-Kralj earned 500 total points
Comment Utility
I'd just use it via php command line:

(If that works bad, use popen())
exec('geoiplookup www.bbc.co.uk');

Open in new window

0
 

Expert Comment

by:neta1o
Comment Utility
There are a bunch of good pure php GEO IP lookups you can use.  Most have free versions that do Country lookup.  The paid are the ones that usually provide more information like city data etc...

ip2location - http://www.ip2location.com/demo.aspx
maxmind - http://www.maxmind.com/app/locate_demo_ip
Geobytes - http://www.geobytes.com/iplocator.htm
hostip - http://www.hostip.info/dl/index.html
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now