• Resolved Ramón

    (@ramontolkamp)


    After installation and activation I keep getting the “Warning! Missing LCache database table, which is required by WP LCache object cache.” error message.

    I followed the installation instructions exactly, tried deactivating and reactivating the plugin (which should trigger creation of the tables), also removing and reinstalling the plugin, but the error message stays.

    It seems the Lcache database tables are not being created upon activation of the plugin. I checked the tables via phpMyAdmin and I could not find a table wp(prefix)_lcache_events.

    My WordPress site (4.8.2) runs on a shared webhosting server (Apache), PHP 7.1.9 with APCu extension 5.1.8, and MariaDB 10.1.24.

    Do you have any ideas or suggestions that will help me to get LCache working?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Daniel Bachhuber

    (@danielbachhuber)

    Are you using WordPress multisite by chance?

    Thread Starter Ramón

    (@ramontolkamp)

    Hello Daniel,

    No, I’m not using multisite.

    To rule out any conflicts or configuration issues, I just created a new subdomain on my webhosting and installed a fresh wordpress instance.

    On this clean installation I deleted the default plugins (Hello Dolly and Akismet) so no plugins are installed. Then installed and activated LCache, and created the stub object-cache.php file in /wp-content.

    Same result: “Missing LCache database table …”

    Any other ideas?

    If it helps, I can give you admin access to this fresh WP installation.

    Plugin Author Daniel Bachhuber

    (@danielbachhuber)

    Thanks for helping to debug, @ramontolkamp.

    If possible, can you debug the activation process itself, to make sure wp_lcache_initialize_database_schema() is being called and to see if any MySQL errors are thrown?

    Thread Starter Ramón

    (@ramontolkamp)

    I’m not familiar with debugging, but I did the following:
    – Enabled WP_DEBUG, WP_DEBUG_DISPLAY, WP_DEBUG_LOG and SAVEQUERIES
    – Deactivated the WP LCache plugin
    – Reactovated the WP LCache plugin.

    Output below. If you need me to do something different then please tell me how.

    Message in wp-admin:
    ————————————————————————-
    The plugin generated 1484 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.

    Contents of debug.log:
    ————————————————————————-
    [28-Sep-2017 14:12:06 UTC] WordPress database error Specified key was too long; max key length is 1000 bytes for query CREATE TABLE IF NOT EXISTSwpul_lcache_events` (
    event_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    pool varchar(255) NOT NULL DEFAULT ” COMMENT ‘PHP process pool that wrote the change.’,
    address varchar(255) DEFAULT NULL COMMENT ‘Cache entry address (bin and key).’,
    value longblob COMMENT ‘A collection of data to cache.’,
    expiration int(11) DEFAULT NULL COMMENT ‘A Unix timestamp indicating when the cache entry should expire, or NULL for never.’,
    created int(11) DEFAULT ‘0’ COMMENT ‘A Unix timestamp indicating when the cache entry was created.’,
    PRIMARY KEY (event_id),
    UNIQUE KEY event_id (event_id),
    KEY expiration (expiration),
    KEY lookup_miss (address,event_id)
    ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci; made by activate_plugin, do_action(‘activate_wp-lcache/wp-lcache.php’), WP_Hook->do_action, WP_Hook->apply_filters, wp_lcache_initialize_database_schema
    [28-Sep-2017 14:12:06 UTC] WordPress database error Specified key was too long; max key length is 1000 bytes for query CREATE TABLE IF NOT EXISTS wpul_lcache_tags (
    tag varchar(191) NOT NULL DEFAULT ”,
    address varchar(191) NOT NULL DEFAULT ”,
    PRIMARY KEY (tag,address),
    KEY rewritten_entry (address)
    ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci; made by activate_plugin, do_action(‘activate_wp-lcache/wp-lcache.php’), WP_Hook->do_action, WP_Hook->apply_filters, wp_lcache_initialize_database_schema`

    • This reply was modified 7 years, 2 months ago by Ramón.
    Plugin Author Daniel Bachhuber

    (@danielbachhuber)

    Thanks! This is exactly what I needed to know.

    I’ve filed an issue to debug further: https://github.com/lcache/wp-lcache/issues/148

    Can you share the contents of your /etc/mysql/my.cnf in a GitHub gist or similar?

    Thread Starter Ramón

    (@ramontolkamp)

    I’m on a shared hosting server, so no root access nor access to the server’s base configurations. I’m limited to what I can do within cPanel and the tools therein (like phpMyAdmin, File Manager, Softaculous Installer, etc).

    I did a search for a my.cnf file in my home directory, but did not find any.

    Hopefully a dump of “SHOW VARIABLES” in mysql is useful to you.
    I’ve saved the dump output here: https://gist.github.com/ramontolkamp/8e1d5b2402217222f519312da5d640ae

    Plugin Author Daniel Bachhuber

    (@danielbachhuber)

    Great! I’ll let you know what I find.

    Plugin Author Daniel Bachhuber

    (@danielbachhuber)

    Hi @ramontolkamp,

    I *think* I’ve tracked this down. Can you try this build of the plugin and verify the fix?

    Here’s the pull request if you’d like to look at the change.

    Thread Starter Ramón

    (@ramontolkamp)

    I think you nailed it @danielbachhuber!

    I installed the plugin alpha build and activated it:
    – The errormessage is now gone, and
    – In myPhpAdmin I see it has created two lcache tables. The lcache_events table is populated with values. The lcache_tags table remains empty, at least for now.

    The plugin seems to be working correctly now. It’s not giving my page-load speeds a real boost, but that’s more likely caused by the limitations of my shared webhosting and a bottleneck somewhere else.

    Thank you for your help and keep up the good work!
    have a great weekend.

    P.S. I noticed open issue #55 on your wp-lcache Github (artwork for the WP Plugin Repository).

    I had some fun in Photoshop and created a design. I’ll upload it there. Not sure if it’s what you have in mind, so do with it what you like.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘LCache database tables not created’ is closed to new replies.