Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

gentoo geoip installation

Posted on 2010-09-04
2
Medium Priority
?
1,409 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 2000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

721 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