Solved

gentoo geoip installation

Posted on 2010-09-04
2
1,348 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
ID: 33603402
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
ID: 33662088
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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.

910 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

20 Experts available now in Live!

Get 1:1 Help Now