#1  
Old 28th November 2013, 15:00
Tarm Tarm is offline
Junior Member
 
Join Date: Oct 2012
Posts: 10
Thanks: 2
Thanked 2 Times in 1 Post
Default Ubuntu + GeoIP2 (licensed)

Hi,

I'm reading the GeoIP tutorial at http://www.howtoforge.com/installing...n-ubuntu-12.04 .
First off using the lite version of GeoIP this works. After purchasing a lisence for GeoIP, I downloaded the new and updated database (.dat), and edited geoip.conf in apache2/mods-available.

The result when running a test script is nothing. I only see a blank page.
I'm using the following code from maxmind.com:
Code:
<?php

// include functions
include("geoip.inc");

// read GeoIP database
$handle = geoip_open("GeoIP.dat", GEOIP_STANDARD);

// map IP to country
echo "IP address 62.149.130.132 located in " . geoip_country_name_by_addr($handle, "62.149.130.132") . " (country code " . geoip_country_code_by_addr($handle, "62.149.130.132") . ")";

// close database handler
geoip_close($handle);

// print compulsory license notice
echo "<p> -- This product includes GeoIP data created by MaxMind, available from http://maxmind.com/ --";

?>
Any ideas? Thanks.
Reply With Quote
Sponsored Links
  #2  
Old 28th November 2013, 15:37
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,717
Thanks: 840
Thanked 5,592 Times in 4,404 Posts
Default

Which error message do you get in the global apache or website error.log file?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
AbannyvabVask (22nd December 2013)
  #3  
Old 28th November 2013, 16:22
Tarm Tarm is offline
Junior Member
 
Join Date: Oct 2012
Posts: 10
Thanks: 2
Thanked 2 Times in 1 Post
 
Default

This is embarrasing, I had forgotten to change the php code I attached with the location to the .inc script and the proper .dat file.
Reply With Quote
The Following 2 Users Say Thank You to Tarm For This Useful Post:
AbannyvabVask (20th December 2013), feeninuoumn (5th December 2013)
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to send/recieve emails on fresh installation hermestrismegistus Installation/Configuration 11 23rd November 2013 17:15
Problem send/receive Courier+Postfix+Squirrelmail Pirk Installation/Configuration 2 21st May 2010 14:26
Connection timed out on intermail outgoing mails gouravgarg Server Operation 6 5th March 2010 21:31
Unbale to login to Postfix from webmail wasimriz HOWTO-Related Questions 5 6th April 2009 14:49
Problem on restart bind9 satimis Server Operation 6 30th October 2007 03:01


All times are GMT +2. The time now is 23:51.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.