Link to home
Start Free TrialLog in
Avatar of yarekGmail
yarekGmail

asked on

gentoo geoip installation

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

ASKER CERTIFIED SOLUTION
Avatar of Rok-Kralj
Rok-Kralj
Flag of Slovenia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of neta1o
neta1o

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