I tried this tutorial http://tech.cibul.net/install-maxminds-geoip-ip-database-on-ubuntu-for-php/ and did everything from it. Compiled the geoip module and also the php extension on my Ubuntu 11.10 installation.
I also tried this more simpler terminal command
(sudo) apt-get install php5-geoip
And it showed successful installation but when I try
geoip_record_by_name('127.0.0.1')
and it still gives nothing, i.e. no array at all.
Try a different IP address – for example
111.111.111.111as you are checking your localhost (127.0.0.1) – it may not run locally anyway.See
geoip_record_by_nameDocs:You get back
FALSEbecause the address was not found in the database.