Solved

gentoo geoip installation

Posted on 2010-09-04
2
1,375 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
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…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

763 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