and site status is still saying that ip2cc database not installed, even after I installed on update settings page.. Any ideas?

background. I downloaded the CSV file and converted that to a mysql file named ipdb.mysql then uploaded that to the ip2cc module folder. I could not download the csv file using the fetchdb.sh

thank you

Comments

mrfelton’s picture

Did you import the database at admin/settings/ip2cc/update ?

ps. the current installation method is an absolute mess and way too manual... I'll be working on that this week hopefully.

mrgoltra’s picture

yes I did I was going crazy because it was still reporting zero but when looked at the db table, it was getting inserted. thanks

mrfelton’s picture

Version: 6.x-1.1-beta2 » 6.x-1.1-beta3
Status: Active » Fixed

please try with beta3.

mrgoltra’s picture

Hi mrfelton

noticed new format. Followed instructions and clicked on update button and waited for 30 minutes. Checked database did not see any new table or entry related to ip2cc. I am assuming that update will insert to ip_to_country table?

Thank you very much

Mark

mrfelton’s picture

Status: Fixed » Active

no, there is no ip_to_country table... the table it inserts into is named ip2cc. Does that table exist in your database? What is in it?

mrgoltra’s picture

ok. table does exist. just checked the logs and getting this

Table 'drupal.ip2cc' doesn't exist query: INSERT INTO ip2cc VALUES('3758096384', '4294967295', 'US', 'Unknown', 0) in /hsphere/local/home/drupal/mysite.com/sites/all/modules/ip2cc/ip2cc.inc on line 21.

mrfelton’s picture

strange. I'd sugest uninstalling and reinstalling the module - make sure you actually uninstall it, disabling it wont do. First, disable it at /admin/build/modules/ then uninstall it at /admin/build/modules/uninstall. Then reenable it at /admin/build/modules... it should create the table for you and populate it.

It's curious that you didn't have the table though - how did you install the module before? did you upgrade from a previous version?

mrgoltra’s picture

ok will try it. Yes I just upgraded.

mrfelton’s picture

upgraded from which version?

mrgoltra’s picture

the one prior to new release.

Sunil Mohan’s picture

StatusFileSize
new718 bytes

I think the problem is that insert statement does not take into account Drupal database prefixes by wrapping the table name in {}. The attached patch with the simple change fixed the problem for me.

Also included in the patch is a small fix to correct the parsing of CSV format. It was missing a double quote at the end earlier.

mrfelton’s picture

Status: Active » Fixed

Committed to CVS. Thank you, I believe this fixes the problem.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.