Digital Point User Map

Digital Point User Map 1.3.2

No permission to download
Depends on the usergroup(s) you defined as staff.

How do you know the pin is for him? It doesn't show their username... are you sure the pin isn't for you?
 
Depends on the usergroup(s) you defined as staff.

How do you know the pin is for him? It doesn't show their username... are you sure the pin isn't for you?
hehehe... two users online... one in Texas (me) and one in Ohio (him).. o_O
But it WAS a misconfiguration part by me. I "assumed" that was for who could see the maps (that's what happens when you install it while setting up your VPS - and this add on was the MAIN reason I went to a VPS). After reviewing that option it makes sense that you define who is the Admin there - well thought out after looking at it.
 
Last edited:
Many of my users are saying the map is showing them nowhere near their location. One is 500+ km's away in the middle of Australia (where their is unlikely to be any internet at all!!). I assume that the map placement comes from the ISP or IP Address owner give co-ords to some sort of authority? Could you briefly explain to me how it works so that I can pass it back to users as an explanation?
 
Yep... it's basically where the ISP registers the IP block to. There are some cases where the ISP registered a huge block that they actually use nationally, but didn't break it up like they are supposed to by region. My guess is the user is on one of those blocks where it knows the country, but not the region/locale. For those IPs, it defaults them to the middle of the country when the country is known, but nothing else.
 
Yep... it's basically where the ISP registers the IP block to. There are some cases where the ISP registered a huge block that they actually use nationally, but didn't break it up like they are supposed to by region. My guess is the user is on one of those blocks where it knows the country, but not the region/locale. For those IPs, it defaults them to the middle of the country when the country is known, but nothing else.

The GeoIP data file being used could also not be of very high quality. Some generic (free) ones floating around aren't very accurate whereas some of the more well kept (paid) versions are more accurate.

Of course, if the ISP really did a crap registration job, then there's not much anyone can do.
 
Well for whatever reason the server thinks it is...

What's the output of this if you run it from the shell?

Code:
ls -al /usr/share/GeoIP/

Here is mine:

server:~# ls -al /usr/share/GeoIP/
total 5.5M
drwxr-xr-x 2 root root 40 Mar 22 09:34 .
drwxr-xr-x 179 root root 8.0K Mar 22 09:34 ..
-rw-r--r-- 1 root root 1.4M Jul 14 2010 GeoIP.dat
-rw-r--r-- 1 root root 4.2M Jul 14 2010 GeoIPv6.dat

But for some reason it still says me to install the Php GeoIP not installed. Using debian 6
 
Here is mine:

server:~# ls -al /usr/share/GeoIP/
total 5.5M
drwxr-xr-x 2 root root 40 Mar 22 09:34 .
drwxr-xr-x 179 root root 8.0K Mar 22 09:34 ..
-rw-r--r-- 1 root root 1.4M Jul 14 2010 GeoIP.dat
-rw-r--r-- 1 root root 4.2M Jul 14 2010 GeoIPv6.dat

But for some reason it still says me to install the Php GeoIP not installed. Using debian 6
You installed the databases.. but did you do a aptitude install libapache2-mod-geoip to install the php module for Apache2?
 
The GeoIP data file being used could also not be of very high quality. Some generic (free) ones floating around aren't very accurate whereas some of the more well kept (paid) versions are more accurate.

I use MaxMind's free DB (country and city/region) with a cron to check/update. Is this a generally considered good free source, or is there better one's?
 
I use MaxMind's free DB (country and city/region) with a cron to check/update. Is this a generally considered good free source, or is there better one's?
Are these the http addresses you use to get them?
http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
Also, how often do you run your cron job. I was editing my script and after the first successful download I started getting 403 errors when trying to fetch (guess the limit per IP on a time basis).
 
Always looking to improve on my system eco ... share?
Here is what I have set up... haven't had it make a real run yet pulling the data in, but I know it sends me an email because I get an error 403. I can't take credit for it, as I found it via Google.
Code:
#!/bin/sh
 
GEOIP_MIRROR="http://geolite.maxmind.com/download/geoip/database"
GEOIPDIR=/usr/share/GeoIP
TMPDIR=
 
EMAIL_TO="tdperry@ride-texas.org"
EMAIL_SUBJECT="[WARNING] GeoIP update error"
EMAIL_HEAD="Dear Master,"
EMAIL_CONTENT="There was an error updating the following GeoIP databases:"
EMAIL_FIX="Don't forget to launch a new update manually. No new automatic update will be done until next week!"
EMAIL_FOOT="Your Slave, from Palestine, TX (USA)."
EMAIL_META="VM: TwoWheelDemons - DNS: twowheeldemon.com - DC: Ram Node"
EMAIL_BUGGY=""
 
DATABASES="GeoLiteCity GeoIP"
 
if [ -d "${GEOIPDIR}" ]; then
                cd $GEOIPDIR
 
                if [ -n "${DATABASES}" ]; then
                                TMPDIR=$(mktemp -d geoipupdate.XXXXXXXXXX)
 
                                echo "Updating GeoIP databases..."
 
                                for db in $DATABASES; do
                                                fname=$(basename $db)
 
                                                wget --no-verbose -t 3 -T 60 "${GEOIP_MIRROR}/${db}.dat.gz" -O "${TMPDIR}/${fname}.dat.gz"
 
                                                if [ "$?" = "0" ]; then
                                                                gunzip -fdc "${TMPDIR}/${fname}.dat.gz" > "${TMPDIR}/${fname}.dat"
                                                                mv "${TMPDIR}/${fname}.dat" "${GEOIPDIR}/${fname}.dat"
                                                                chmod 0644 "${GEOIPDIR}/${fname}.dat"
                                                                mv /usr/share/GeoIP/GeoIPLiteCity.dat /usr/share/GeoIP/GeoIPCity.dat
                                                else
                                                                if [ "${EMAIL_BUGGY}" = "" ]; then
                                                                        EMAIL_BUGGY=$db
                                                                else
                                                                        EMAIL_BUGGY=${EMAIL_BUGGY}", $db"
                                                                fi
                                                fi
                                done
 
                                [ -d "${TMPDIR}" ] && rm -rf $TMPDIR
 
                                if [ "${EMAIL_BUGGY}" != "" ]; then
                                        echo "${EMAIL_HEAD}\n\n${EMAIL_CONTENT} ${EMAIL_BUGGY}\n\n${EMAIL_FIX}\n\n\n${EMAIL_FOOT}\n\n\n${EMAIL_META}" | /usr/bin/mail -s "${EMAIL_SUBJECT}" "${EMAIL_TO}"
                                fi
                fi
fi
 
Here is what I have set up... haven't had it make a real run yet pulling the data in, but I know it sends me an email because I get an error 403. I can't take credit for it, as I found it via Google.

Thanks.

Hahahaha, love the email start, 'Dear Master," :)
 
Thanks.

Hahahaha, love the email start, 'Dear Master," :)
I've had to modify the script since I just noticed that it pulls from two different directories on MaxMind, one for the GeoLiteCity and one for the GeoIP.

Code:
#!/bin/sh
 
GEOIP_MIRROR="http://geolite.maxmind.com/download/geoip/database"
GEOIPDIR=/usr/share/GeoIP
TMPDIR=
 
EMAIL_TO="tdperry@ride-texas.org"
EMAIL_SUBJECT="[WARNING] GeoIP update error"
EMAIL_HEAD="Oh Worthy One,"
EMAIL_CONTENT="There was an error updating the following GeoIP databases:"
EMAIL_FIX="Don't forget to launch a new update manually. No new automatic update will be done until next month!"
EMAIL_FOOT="Your Slave, from Palestine, TX (USA)."
EMAIL_META="VM: server_name - DNS: server_domain.tld - DC: server_datacenter"
EMAIL_BUGGY=""
 
DATABASES="GeoLiteCity GeoLiteCountry/GeoIP"
 
if [ -d "${GEOIPDIR}" ]; then
                cd $GEOIPDIR
 
                if [ -n "${DATABASES}" ]; then
                                TMPDIR=$(mktemp -d geoipupdate.XXXXXXXXXX)
 
                                echo "Updating GeoIP databases..."
 
                                for db in $DATABASES; do
                                                fname=$(basename $db)
 
                                                wget --no-verbose -t 3 -T 60 "${GEOIP_MIRROR}/${db}.dat.gz" -O "${TMPDIR}/${fname}.dat.gz"
 
                                                if [ "$?" = "0" ]; then
                                                                gunzip -fdc "${TMPDIR}/${fname}.dat.gz" > "${TMPDIR}/${fname}.dat"
                                                                mv "${TMPDIR}/${fname}.dat" "${GEOIPDIR}/${fname}.dat"
                                                                chmod 0644 "${GEOIPDIR}/${fname}.dat"
                                                else
                                                                if [ "${EMAIL_BUGGY}" = "" ]; then
                                                                        EMAIL_BUGGY=$db
                                                                else
                                                                        EMAIL_BUGGY=${EMAIL_BUGGY}", $db"
                                                                fi
                                                fi
                                done
 
                                [ -d "${TMPDIR}" ] && rm -rf $TMPDIR
 
                                if [ "${EMAIL_BUGGY}" != "" ]; then
                                        echo "${EMAIL_HEAD}\n\n${EMAIL_CONTENT} ${EMAIL_BUGGY}\n\n${EMAIL_FIX}\n\n\n${EMAIL_FOOT}\n\n\n${EMAIL_META}" | /usr/bin/mail -s "${EMAIL_SUBJECT}" "${EMAIL_TO}"
                                fi
                fi
fi

I had a mistake in my original. Since they keep the two databases in separate directories, in your Databases statement you have to put the leading GeoLiteCountry in front of the GeoIP.
 
Instead of geo-locating current users, could this be adapted to allow memebrs to "pin" themselves on a map based on their zip/postal code/city, etc?
 
Instead of geo-locating current users, could this be adapted to allow memebrs to "pin" themselves on a map based on their zip/postal code/city, etc?
I suppose if someone wanted to modify it to do it, but it would probably be easier to make a completely different system for that from scratch since that's not what this does.
 
Back
Top Bottom