• Resolved ampapa

    (@ampapa)


    I’m seeing the following messages after install, is this normal? or is thre really an install problem.. thanks

    IP Geo Block: /home/hostname/public_html/wp-content/plugins/ip-geo-block/classes/class-ip-geo-block-logs.php (133) Table ‘hostname_host.wp_ip_geo_block_cache’ doesn’t exist

    IP Geo Block: /home/hostname/public_html/wp-content/plugins/ip-geo-block/classes/class-ip-geo-block-logs.php (837) Table ‘hostname_host.wp_ip_geo_block_cache’ doesn’t exist

    IP Geo Block: /home/hostname/public_html/wp-content/plugins/ip-geo-block/classes/class-ip-geo-block-logs.php (210) Table ‘hostname_host.wp_ip_geo_block_stat’ doesn’t exist

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author tokkonopapa

    (@tokkonopapa)

    Hi @ampapa,

    is this normal?

    Unfortunately, No. Creating new tables in your database was failed on activation. Please try followings:

    1. Check the capacity of your database. If it is full, creating the DB table may be failed.

    2. Once deactivate this plugin and re-activate again to try creating tables again.

    3. Add one line define( 'IP_GEO_BLOCK_DEBUG', true ); into your “wp-config.php”. You can find the following option in “Plugin settings” section:

    Then try to “Create now” button. If you find fail message, I think this issue would be caused by your database system.

    I appreciate you if you let me know the result.
    Thanks for your cooperation.

    Thread Starter ampapa

    (@ampapa)

    The DB size is 8.77MB so I don’t think its a sizing issue.

    Still not a working solution, from the debug info window:

    – Server: Apache
    – PHP: 7.0.22
    – PHP SAPI: cgi-fcgi
    – WordPress: 4.9.4
    – Multisite: no
    – File system: direct
    – Temp folder: /tmp/
    – Umask: 755
    – Zlib: yes
    – ZipArchive: yes
    – PECL phar: yes
    – BC Math: yes
    – mb_strcut: yes
    – SQLite(PDO): yes
    – DNS lookup: available [2412.1 msec]
    – User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0
    – Customizr 3.2.10
    – Antispam Bee 2.7.1
    – Enhanced Media Library 2.5
    – IP Geo Block 3.0.9
    – iThemes Security 6.9.2
    – UpdraftPlus – Backup/Restore 1.14.4
    – Wordfence Security 7.1.1
    – YouTube 11.8.6.1

    Thread Starter ampapa

    (@ampapa)

    Can I manually pre-seed the tables?

    Plugin Author tokkonopapa

    (@tokkonopapa)

    Hi @ampapa,

    Unfortunately, I don’t have any idea why the tables could not be created.

    One possible solution would be to use dbDelta(). In this plugin, $wpdb->query() is directly called on creating table.

    Can I manually pre-seed the tables?

    Well, I can send you SQL for creating PREFIX_ip_geo_block_cache and PREFIX_ip_geo_block_stat by email if you send me an email to tokkonopapa at yahoo dot com.

    And one more table PREFIX_ip_geo_block_logs is needed. So would you check if it exists using phpMyAdmin?

    For my side, I’ll test using dbDelta().

    So much appreciated your cooperation!

    Plugin Author tokkonopapa

    (@tokkonopapa)

    I’d like to ask you one more thing.

    Would you let me know what type of database software is used on your host and also its version. I hope it may be mySQL.

    Thanks!

    Hi @tokkonopapa!!

    Look, I have almost the same error as OP after reactivation:

    IP Geo Block: /home/myacct/public_html/wp-content/plugins/ip-geo-block/classes/class-ip-geo-block-logs.php (893) Table ‘myacct_mydbprefix.mydb_ip_geo_block_cache’ doesn’t exist
    IP Geo Block: /home/myacct/public_html/wp-content/plugins/ip-geo-block/classes/class-ip-geo-block-logs.php (938) Table ‘myacct_mydbprefix.mydb_ip_geo_block_cache’ doesn’t exist

    I have gone through a number of steps with no relief.

    Please let me know if you prefer I start my own topic, or continue here.

    Thanks

    Plugin Author tokkonopapa

    (@tokkonopapa)

    Hi @gastronimo,

    Please let me know if you prefer I start my own topic, or continue here.

    You are OK if you have the same issue at the first installation.

    Actually, @ampapa made data tables manually using phpMyAdmin.

    I improved the code based on his information, but I might be failed.

    If you adopt mySQL and you have enough skill to make a table manually, please try the following SQL:

    CREATE TABLE your_prefix_ip_geo_block_cache(
        `No` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
        `time` INT(10) UNSIGNED NOT NULL DEFAULT 0,
        `hook` VARCHAR(8) NOT NULL,
        `ip` VARBINARY(96) UNIQUE NOT NULL,
        `asn` VARCHAR(8) NULL,
        `code` VARCHAR(2) NOT NULL DEFAULT 'ZZ',
        `auth` INT(10) UNSIGNED NOT NULL DEFAULT 0,
        `fail` INT(10) UNSIGNED NOT NULL DEFAULT 0,
        `call` INT(10) UNSIGNED NOT NULL DEFAULT 0,
        `last` INT(10) UNSIGNED NOT NULL DEFAULT 0,
        `view` INT(10) UNSIGNED NOT NULL DEFAULT 0,
        `host` VARBINARY(512) NULL,
        PRIMARY KEY(`No`)
    ) CHARACTER SET utf8

    I already tested it on mySQL. If you adopt MariaDB, please wait until I finish to test the above SQL on MariaDB.

    I’m sorry for your inconvenience.

    • This reply was modified 6 years, 4 months ago by tokkonopapa.

    Gracias!

    so far, when I enter (using my real DB ID)

    SQL query:

    CREATE TABLE my_prefix_ip_geo_block_cache(
    No BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
    time INT(10) UNSIGNED NOT NULL DEFAULT 0,
    hook VARCHAR(8) NOT NULL,
    ip VARBINARY(96) UNIQUE NOT NULL,
    asn VARCHAR(8) NULL,
    code VARCHAR(2) NOT NULL DEFAULT ‘ZZ’,
    auth INT(10) UNSIGNED NOT NULL DEFAULT 0,
    fail INT(10) UNSIGNED NOT NULL DEFAULT 0,
    call INT(10) UNSIGNED NOT NULL DEFAULT 0,
    last INT(10) UNSIGNED NOT NULL DEFAULT 0,
    view INT(10) UNSIGNED NOT NULL DEFAULT 0,
    host VARBINARY(512) NULL,
    PRIMARY KEY(No)
    ) CHARACTER SET utf8

    I only get:

    ySQL said: Documentation
    #1146 – Table ‘my_prefix_ip_geo_block_cache’ doesn’t exist

    I will try again tomorrow and post update…

    You know, @tokkonopapa,

    I’ve said something similar before, and it certainly bears mentioning again, that your dedication to your plugin and user support of it is outstanding, if not second to none that I have seen on www.ads-software.com.

    I admire and thank you for that.

    Having said that, I’ve had some unfortunate experiences dealing with tables that are not supposed to exist but do. In this particular case, I was able to somehow delete one table anyway, but on re-creation I am presented with this error:

    #1005 – Can’t create table ‘my_prefix_ip_geo_block_cache’ (errno: -1)

    Maybe you have seen this before, or can tell we how to proceed next?

    Plugin Author tokkonopapa

    (@tokkonopapa)

    Hi @gastronimo,

    We had met at here!

    Having said that, I’ve had some unfortunate experiences dealing with tables that are not supposed to exist but do.

    Is it “DB Error- Directory Table doesn’t exist“?

    I googled “#1146 Table doesn’t exist” and found a lot of similar issues in stack overflow:

    But unfortunately, I could not find a proper solution from these which I can do something with my plugin. The most possible causes would be:

    My suggestion here is to execute REPAIR TABLE SQL if you find your_prefix_ip_geo_block_cache in your phpMyAdmin even if there’s the error “#1005 – Can’t create table ‘my_prefix_ip_geo_block_cache’ (errno: -1)”.

    So after making a back up of your database, please try the following:

    Repair table on phpMyAdmin

    I think that trying various plugins and themes makes a lot of unused/unneeded tables in your MySQL. So refreshing your database may be another solution.

    I’m sorry I can’t show you a concrete way to solve this issue for now. But please consider the above.

    OK, that info is very useful, although not so much in my case, just because the table in question does not show up under structure, and is only listed on the file structure menu. However, as one link mentioned, I do have an upper case letter in part of the DB name!

    As I already exported the plugin settings, I guess I will try removing every trace of IPGB manually then see what happens.

    Thanks again

    Hola @tokkonopapa!

    Just wanted to close this thread by reporting that I never found an online solution for the DB error, BUT I was able to successfully create a similarly named table (wp1_ip_geo_block_cache), the RENAME it to my main site (wp_ip_geo_block_cache), and voila! Seems to hold up fine.

    Thanks for all.

    Plugin Author tokkonopapa

    (@tokkonopapa)

    Hi @gastronimo,

    Thank you for your feedback! And I am sorry to have made you a lot of hardship.

    I’m not sure the original thread owner could solve the issue or not. But I’d like to close this topic with the following information:

    Verified the following environment in IPGB version 3.0.14 (with dbDelta())

    1.
    – Server: Apache/2.4.3
    – MySQL: 5.5.27
    – PHP: 5.4.7
    – PHP SAPI: apache2handler
    – WordPress: 3.7.27

    2.
    – Server: Apache/2.4.33
    – MySQL: 5.7.21
    – PHP: 5.3.5
    – PHP SAPI: apache2handler
    – WordPress: 4.9.8

    3.
    – Server: Apache/2.4.33
    – MySQL: 10.1.34-MariaDB
    – PHP: 7.2.7
    – PHP SAPI: apache2handler
    – WordPress: 4.9.8

    4.
    – Server: nginx/1.13.2
    – MySQL: 5.7.21
    – PHP: 7.2.7
    – PHP SAPI: cgi-fcgi
    – WordPress: 4.9.8

    Thanks again!!

    SIDE NOTE: I just realized that with IPGB network activated the table ip_geo_block_cache ‘appears’ to be present on all my subsites in phpMyAdmin– though actually selecting any (all except for one!) will return the error: #1146-table does not exist.

    Looks like I will be manually deleting these ghost tables, then copying the only good table from the one subsite where it actually does exist to repopulate all the others…(Of course, if you do NOT have one good table example to work with, you will need to create a new one for a non-existing subsite like #0=’0’=_0_)

    BONUS ROUND:
    So after much trial and error, this is my only way successful way to Delete ghost DB tables for IPGB cache repop:

    1) Select subsite# ghost table Structure ICON (not table name/link!) >>ignore errors
    1a) go to Operations>> from the bottom of window, not the top- Delete the table(DROP) >> Confirm – OK >> you will see ‘# unknown table’ popup
    2) Switch to or Select (good) table from Recents (i.e.: wp_8_ip_geo_block_cache)
    2a) go to Operations>> Copy table to subsite ‘0’ = wp_0_ip_geo_block_cache
    3) Switch to or Select – wp_0_ip_geo_block_cache
    3a) RENAME table from ‘0’ to desired subsite# (i.e.: wp_4_ip_geo_block_cache)

    REPEAT the above for each ghost table entry ??
    then Recheck debug.log for errors

    Plugin Author tokkonopapa

    (@tokkonopapa)

    Good morning @gastronimo from japan,

    I had tested multisite on some of the environment I wrote the previous thead, but not all.

    I just realized that with IPGB network activated the table ip_geo_block_cache ‘appears’ to be present on all my subsites in phpMyAdmin

    That’s true.

    In each site, three tables like prefix_n_ip_geo_block_cache, prefix_n_ip_geo_block_logs and prefix_n_ip_geo_block_stat would be created.

    I think the last 2 tables might be OK in your sites. So I’ll investigate creating the cache table in particular.

    Thank you for the side note and bonus round!

    • This reply was modified 6 years, 2 months ago by tokkonopapa.
Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘New install seeing error… ?’ is closed to new replies.