Hello all,
Some time ago, we had to disable the IP to Nation module, which caused our store to stop automatically redirecting visitors to the correct section based on their IP. We would like to get this functionality back, and I have been investigating possible causes for the problem.
What I have found thus far is:
1. A manual update of the IP to Nation database hangs on the following message:
Unpacked IP Database. Inserting data ..2. The corresponding table shows incorrect data for two pertinent columns:
mysql> SELECT * FROM exp_ip2nation;
+--------+--------------+---------------+---------+
| id | ip_range_low | ip_range_high | country |
+--------+--------------+---------------+---------+
| 1 | 0 | 0 | at |
| 2 | 0 | 0 | au |
| 3 | 0 | 0 | cn |
| 4 | 0 | 0 | au |
| 5 | 0 | 0 | cn |
| 6 | 0 | 0 | jp |
| 7 | 0 | 0 | cn |
| 8 | 0 | 0 | jp |
| 9 | 0 | 0 | th |
| 10 | 0 | 0 | cn |
| 11 | 0 | 0 | au |
| 12 | 0 | 0 | cn |
| 13 | 0 | 0 | jp |
| 14 | 0 | 0 | th |
| 15 | 0 | 0 | cn |
| 16 | 0 | 0 | au |
| 17 | 0 | 0 | cn |
| 18 | 0 | 0 | th |
| 19 | 0 | 0 | cn |
| 20 | 0 | 0 | au |The above is just a snippet, but the entire table has 0 values for both ‘ip_range_low’ and ‘ip_range_high’.
3. I have manually downloaded the GeoIPCountryCSV.zip file which is mentioned in the following section of system/expressionengine/modules/ip_to_nation/mcp.ip_to_nation.php:
// download
$files = array(
'http://geolite.maxmind.com/download/geoip/database/GeoIPCountryCSV.zip',
'http://geolite.maxmind.com/download/geoip/database/GeoIPv6.csv.gz'
);The extracted CSV contains the appropriate data that are to be injected into the columns of the exp_ip2nation table.
4. PHP has zip and gzip support enabled, as both of the files are extracted to the cache folder without problem.
If anyone has suggestions for further troubleshooting, please let me know.
Cheers,
Nathan Zachary