Advertisement:

Author Topic: geoIP (IP to Location)  (Read 44596 times)

Offline cyberjunkie

  • Semi-Newbie
  • *
  • Posts: 85
Re: geoIP (IP to Location)
« Reply #60 on: June 18, 2012, 03:12:28 PM »
I have 3 errors

The Database is not installed
Last Update Status: The MaxMind download site did not respond

This was voor de country and city csv


The Database is not installed
Last Update Status: Error during the downloading of the zip file from MaxMind

This was for the Country only


The Database is not installed
Last Update Status: Unable to find unzipped files

And this one was for the manual install.

The csv file.s are in the directory  Sources/geoIP/



Offline koop

  • Newbie
  • *
  • Posts: 6
Re: geoIP (IP to Location)
« Reply #61 on: October 15, 2012, 11:46:30 PM »
I just installed geoip, installed the full database option and then enabled the options.  I'm now getting the following error on my site and have lost all functionality. 

The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
File: /hermes/waloraweb082/b2083/moo.thebigtenhangoutcom/forum/Sources/geoIP.php
Line: 586

Any ideas?  I cannot find "Max_join_size" in my php.ini file. 

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 73,189
Re: geoIP (IP to Location)
« Reply #62 on: October 16, 2012, 09:55:49 AM »
You won't find it in php.ini, because it's not a PHP option. It's an SQL configuration option in MySQL - and on shared hosting you're just not going to be able to change that.

I'd love to know what's on lines 576-586 of geoIP.php.
No good deed goes unpunished
All helpful urges should be circumvented

Offline Leo2

  • Semi-Newbie
  • *
  • Posts: 19
  • Gender: Male
Re: geoIP (IP to Location)
« Reply #63 on: October 22, 2012, 03:33:16 AM »
I have same MAX_JOIN_SIZE error after my hoster made some 'upgrade' in their database.

My forum didn't work until I removed older Geoip version ( I had to comment call to it in subs.php because admin pages didn't work either). After installing the newer version, the forum works, but shows same error in user profile.

Lines 568-586 are:

Code: [Select]
if (strpos($ip,'.'))
$ip = geo_dot2long($ip);

$request = $smcFunc['db_query']('', '
SELECT ip.start, ip.end,
bl.city, bl.latitude, bl.longitude,
gc.cc, gc.cn as country,
gr.rn as region
FROM {db_prefix}geoip_ip as ip
LEFT JOIN {db_prefix}geoip_blocks AS bl ON (ip.locid = bl.locid)
LEFT JOIN {db_prefix}geoip_countries AS gc ON (gc.cc = bl.country)
LEFT JOIN {db_prefix}geoip_regions AS gr ON (gr.rc = bl.region && gr.cc = bl.country)
WHERE ip.end >= {int:ip}
ORDER BY ip.end ASC
LIMIT 1',
array(
'ip' => (int) $ip
)
);

Offline Joker™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,914
  • Gender: Male
    • siddhartha-gupta on GitHub
Re: geoIP (IP to Location)
« Reply #64 on: October 22, 2012, 08:25:41 AM »
I have same MAX_JOIN_SIZE error after my hoster made some 'upgrade' in their database.

My forum didn't work until I removed older Geoip version ( I had to comment call to it in subs.php because admin pages didn't work either). After installing the newer version, the forum works, but shows same error in user profile.
A user has faced similar issue. Try reading out the topic.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Offline Leo2

  • Semi-Newbie
  • *
  • Posts: 19
  • Gender: Male
Re: geoIP (IP to Location)
« Reply #65 on: October 24, 2012, 05:31:20 AM »
A user has faced similar issue. Try reading out the topic.
Thank you! That helped me too.
However, I face another problem with online users counter, making geoip useless. May be you know the fix for that too?

Offline Ice_Drake

  • Semi-Newbie
  • *
  • Posts: 22
    • Ethera Forum
Re: geoIP (IP to Location)
« Reply #66 on: October 31, 2012, 08:07:44 PM »
Hi, I am having trouble installing the MaxMind CountryLite database. I tried installing it with the script, but it said Database Import Error. Then I tried installing it manually, but it always fails with the following error for two of the five tables:

Invalid column count in CSV input on line 1.

For those who has success installing the database, may you attach the mySQL file for those tables?

Offline musicus

  • Jr. Member
  • **
  • Posts: 179
  • Gender: Male
    • @net_mu on Twitter
    • Mucic for open ears
Re: geoIP (IP to Location)
« Reply #67 on: November 18, 2012, 07:35:03 PM »
I think I can report a new bug.
The addon has worked for about 6 months without any problems. Then I realized that at once is no new user more signed up. I've tried I then times as a new user to log on again. Then came the message: "error: registration disabled".
After I the addon was uninstalled, the registry went again.
Since our Forum has an international audience, I found very handy to see it, where the users are coming
Sorry, for my bad English

Offline bgandy

  • Semi-Newbie
  • *
  • Posts: 21
Re: geoIP (IP to Location)
« Reply #68 on: November 26, 2012, 03:27:57 PM »
Is this mod still supported?

I installed on my site, but no one can see it. Not even the admin account. I have the mod enabled in settings and I have added permission for the groups allowed access.

Offline Qayyom Ashraf

  • Jr. Member
  • **
  • Posts: 141
  • Gender: Male
  • Qayyom Ashraf
    • JangForum - Pakistan
Re: geoIP (IP to Location)
« Reply #69 on: December 05, 2012, 12:54:54 AM »
I tried to search Coutry & City database menually but did't find from the mentioned site.

Please give me the complete URL of downloadable database

Regards,
Qayyom Ashraf  |  Karachi-PK |::.www.JangForum.Com.::|

Offline Hristo

  • Jr. Member
  • **
  • Posts: 319
  • Gender: Male
Re: geoIP (IP to Location)
« Reply #70 on: December 05, 2012, 01:35:28 AM »
If you mean the MaxMind databases, here they are (the free ones):
http://dev.maxmind.com/geoip/geolite

Offline cyberjunkie

  • Semi-Newbie
  • *
  • Posts: 85
Re: geoIP (IP to Location)
« Reply #71 on: February 15, 2013, 01:59:21 PM »
I have 3 errors

The Database is not installed
Last Update Status: The MaxMind download site did not respond

This was voor de country and city csv


The Database is not installed
Last Update Status: Error during the downloading of the zip file from MaxMind

This was for the Country only


The Database is not installed
Last Update Status: Unable to find unzipped files

And this one was for the manual install.

The csv file.s are in the directory  Sources/geoIP/

Is here any support?

Offline SugarD-x

  • Full Member
  • ***
  • Posts: 409
  • Gender: Male
  • SMF and PHPBB Fan
    • SugarDx on Facebook
    • SugarD-x on GitHub
    • sugardx on LinkedIn
    • @SugarDx on Twitter
    • Clan Xperience
Re: geoIP (IP to Location)
« Reply #72 on: May 28, 2013, 10:22:50 AM »
I'm getting similar issues. Due to my crappy free host for this site I'm developing on, I can't download via the Country/City option successfully. Country partially works, as it grabs the file and begins to unzip, but it never finishes, so the file is corrupt. If I try to import the unzipped files manually from MaxMind's site, it just gives me the usual "Database Import Error". I'm completely out of ideas here.

Offline Spuds

  • SMF Hero
  • ******
  • Posts: 1,798
  • Gender: Male
Re: geoIP (IP to Location)
« Reply #73 on: May 28, 2013, 11:40:25 AM »
I made a couple of minor updates on the github repo here: https://github.com/Spuds/GeoIP

Maxmind had moved the location of the larger country/city files and a tweak that will help with some instances of mysql during the import (I think it was just the .js and two .php files that changed, so you can just copy those over the ones in your current installation)

But here is the deal, these are very large files that will fail for a lot of reasons.  The Zip file likes to timeout during the download on slow hosts, or ones that don't allow a long enough connection.  Then there is the memory issue during unzip, mostly on hosts that don't have the zip library installed, then there is the sql import, and if your host does not have the csv import capability enabled then you are SOL.  There is not much I can do about that in the mod to work around those host issues.

Offline SugarD-x

  • Full Member
  • ***
  • Posts: 409
  • Gender: Male
  • SMF and PHPBB Fan
    • SugarDx on Facebook
    • SugarD-x on GitHub
    • sugardx on LinkedIn
    • @SugarDx on Twitter
    • Clan Xperience
Re: geoIP (IP to Location)
« Reply #74 on: May 28, 2013, 11:49:46 AM »
I made a couple of minor updates on the github repo here: https://github.com/Spuds/GeoIP
Aren't those already applied to the latest download hosted on SMF? I checked the version numbers of some modified pages and they matched, plus your changelog on the download page says you updated it last month. :P

Edit: Updated them to try anyway. Accessing the geoIP admin page is causing it to display "Fatal error: Call to undefined function geoIPEntry() in /<Board Host Root Location>/Sources/Admin.php on line 638".

Edit #2: Ignore the previous edit. That was a bad download of the files. Redownloaded them and it's working fine again. I'll reply back when I figure out what's going on with the manual update. :)

Edit #3: Ya, it unfortunately didn't solve the issue with grabbing them through any method. Is there a separate script included in the mod that can manually import them to the database when I download the files, or does it have to be run through the admin page only? I'm thinking that if I can run it outside the forum itself, it might tell me where it's breaking in more detail.

Edit #4: I also noticed a small bug in the error log when running the scheduled task for updating. Not sure if it's caused by my situation or not, but I figured it would be worth noting:

Code: [Select]
<Board Host Root Location>/index.php?action=admin;area=scheduledtasks
8: Undefined variable: result
File: /<Board Host Root Location>/Sources/ScheduledTasks.php
Line: 1659

<Board Host Root Location>/index.php?action=admin;area=scheduledtasks
8: Undefined index: geoIP_db
File: /<Board Host Root Location>/Sources/ScheduledTasks.php
Line: 1656

<Board Host Root Location>/index.php?action=admin;area=scheduledtasks
8: Undefined index: geoIP_db
File: /<Board Host Root Location>/Sources/ScheduledTasks.php
Line: 1654
« Last Edit: May 28, 2013, 12:24:47 PM by SugarD-x »

Offline geogeo.gr

  • Semi-Newbie
  • *
  • Posts: 61
    • www.geogeo.gr on Facebook
    • geogeo-gr on GitHub
    • @geogeo_gr on Twitter
    • geogeo.gr
Re: geoIP (IP to Location)
« Reply #75 on: June 06, 2013, 01:12:06 PM »

Offline Manu.G

  • Full Member
  • ***
  • Posts: 448
  • Gender: Female
  • Angel by Day, Devil by Night
    • http://facebook.com/manuela.guth on Facebook
    • Fan Community
Re: geoIP (IP to Location)
« Reply #76 on: June 09, 2013, 06:54:00 AM »
I made a couple of minor updates on the github repo here: https://github.com/Spuds/GeoIP

Maxmind had moved the location of the larger country/city files and a tweak that will help with some instances of mysql during the import (I think it was just the .js and two .php files that changed, so you can just copy those over the ones in your current installation)

But here is the deal, these are very large files that will fail for a lot of reasons.  The Zip file likes to timeout during the download on slow hosts, or ones that don't allow a long enough connection.  Then there is the memory issue during unzip, mostly on hosts that don't have the zip library installed, then there is the sql import, and if your host does not have the csv import capability enabled then you are SOL.  There is not much I can do about that in the mod to work around those host issues.

I exchanged the updated files but I still get this error
Quote
The Database is not installed
Last Update Status: Database Import Error


What exactly have I to do to get it work again :(
Version SMF 2.0.8
SimplePortal 2.3.5

Offline hall

  • Newbie
  • *
  • Posts: 1
Re: geoIP (IP to Location)
« Reply #77 on: July 08, 2013, 04:24:44 AM »
Dear developer team,

how to install as "database choice - Manual" ? Which files have to be uploaded to <forum>/sources/geoIP. Manual installation seems to be better way to avoid connections failures.
Please reply and greetings,
Miro M.

Offline Ice_Drake

  • Semi-Newbie
  • *
  • Posts: 22
    • Ethera Forum
Re: geoIP (IP to Location)
« Reply #78 on: July 10, 2013, 07:50:46 PM »
Well, I am back after a very long period of figuring out how to import the database correctly. I am back to partially guide those who are still having trouble getting this mod to work. Below is a brief overview of what you have to do in order to get this mod to work:

1. Install the mod as normal.

2. Attempt the database installation, which have been failing for me and probably among many others.

3. Create the database tables to match the schema of the downloaded CSV files in phpMyAdmin. Depending of whether you want Country only or with City, you should have different amount of tables. For Country and City, you should have five tables: geoip_blocks, geoip_countries, geoip_ip, geoip_ip_temp, and geoip_regions.

4. Import the contents of those CSV files downloaded from MaxMind to the correct tables. Do the import with the following configuration:

- Fields terminated by ','
- Enclosed by ' " '
- Lines terminated by '\n'
- Ignore 2 lines (only for certain CSV files)

Note that you can run into PHP timeout (of 300 seconds) when attempting to import a large CSV file. If that is the case, you must upload the file first to your server before proceeding with the import using LOAD DATA INFILE query. Depending on which file you are importing, there are two CSV files where you have to ignore the first two lines since they include the copyright and table schema.

5. If you run into import issue where you get an "access denied" message, address the issue with your web hosting provider. For me, my web hosting provider weren't able to locate the issue, so I have to do the import to a private server and export it as sql file and then import to the server via SSH since phpMyAdmin has been giving me lot of problems.

6. After successfully import the contents, change two records in smf_settings table: geoIP_status and geoIP_status_details. Change geoIP_status to 100 and geoIP_status_details to Success.

7. Insert a new record to that table and name it geoIP_db. Set it to 1.

8. Don't bother updating the database afterward. I figure that it will break something.

You should have a working geoIP mod installed.