• NOTE: This appears to only be in the 0.7 devel version, not in the current (as of now) 0.6 release.

    Just activated “Active Directory Authentication Integration” plugin (devel version 0.7) and two things have happened:

    1) Page load times have gone through the roof
    2) PHP Error logs filling up with the following message(s)

    [16-Jan-2012 22:57:06] WordPress database error Table 'MyDatabaseName.wp_adauthint' doesn't exist for query SELECT 1 res FROM wp_adauthint LIMIT 1 made by require, require_once, require_once, require_once, do_action, call_user_func_array, instantiate_adai_plugin, ADAuthInt_Plugin->__construct
    
    [16-Jan-2012 22:57:24] WordPress database error Table 'MyDatabaseName.wp_adauthint' doesn't exist for query SELECT 1 res FROM wp_adauthint LIMIT 1 made by require, require_once, require_once, do_action, call_user_func_array, instantiate_adai_plugin, ADAuthInt_Plugin->__construct
    
    [16-Jan-2012 22:57:28] WordPress database error Table 'MyDatabaseName.wp_adauthint' doesn't exist for query SELECT 1 res FROM wp_adauthint LIMIT 1 made by require_once, require_once, require_once, require_once, do_action, call_user_func_array, instantiate_adai_plugin, ADAuthInt_Plugin->__construct

    When I disable the plugin, page load times go back to normal and the error log is clean.

    I’m using version 0.7 due to sorting out a previous issue.

    The same issue does not seem to be present in the current 0.6 version.

    https://www.ads-software.com/extend/plugins/active-directory-authentication-integration/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Curtiss Grymala

    (@cgrymala)

    Thanks for the report. I’ll see what I can do to get that fixed.

    Thread Starter tunamaxx

    (@tunamaxx)

    No problem. I took a brief look through the both versions (0.6 release and 0.7 devel) and it looks like it might be related to <b>class-active-directory-authentication-integration.php</b> in the plugin root.

    The 0.7 version query that is causing the error seems to come from line 384:

    if( 1 == $wpdb->get_var( $wpdb->prepare( "SELECT 1 res FROM " . $tablename . " LIMIT 1" ) ) ) {

    In the 0.6 version, the corresponding code from line 372 is:

    if( $wpdb->get_var( "SHOW TABLES LIKE '" . $tablename . "'" ) != $tablename ) {

    Maybe that narrows it down a bit.

    Plugin Author Curtiss Grymala

    (@cgrymala)

    Yeah, that’s the bit that’s causing that issue. In the original release of the plugin, I was basically just trying to branch another plugin (Active Directory Integration), which (at least at the time) used a separate table in the database to store failed logins.

    Since then, I’ve moved the failed logins out of that table and into one of WordPress’ standard tables, so in this version of the plugin, I’m trying to test for the existence of that table and remove it if it exists.

    I’m committing an update right now that might fix that issue (it adds an option to the database after it checks to see if that table still exists, so it shouldn’t ever check again). Unfortunately, I won’t be in a spot where I can check to make sure I didn’t break anything else in making that fix until tomorrow. If you want to try it out, please let me know. Otherwise, I’ll try to report back tomorrow. Thanks.

    Thread Starter tunamaxx

    (@tunamaxx)

    Sure, I can can give it a go.

    Version 0.6 does a similar check / cleanup though too, right? Why the change in tactics? Database portability I assume…

    Plugin Author Curtiss Grymala

    (@cgrymala)

    You’re right. I forgot that I started trying to delete that table in 0.6. I think I changed the way it tests for that table because I was getting lots of errors when testing the 0.6 way. After the change, I haven’t noticed as many errors about that particular item; but now (if this fix works), we shouldn’t notice them more than once.

    The change in tactics as far as the data storage goes is simply because I have a personal dislike for plugins that create new tables instead of using the existing tables.

    Thread Starter tunamaxx

    (@tunamaxx)

    I totally understand the disdain for new (non WP) tables. What I couldn’t figure out was the change in the test for the table. “Lots of errors” is certainly a good reason to try a new test. ??

    Hi all – I think this is related – I’ve got 3.3.1 & .06 — my php logs are filling up with –>

    ok – I can’t seem to post my error message . . . the page keeps timing out

    basically it’s a SQL error that says I cannot drop the table wp_adauthint because it does not exist . . . Is there an update?

    Plugin Author Curtiss Grymala

    (@cgrymala)

    @tunamaxx – I think I found the reason behind the decreased performance between 0.6 and 0.7, and I don’t think it has much to do with checking for the existence of the table.

    In the current dev version, I’ve implemented a test to make sure WP can connect to AD before adding a filter to filter out login attempts. Unfortunately, the way it’s currently implemented, that means that WP is attempting to connect to AD every single time a page is loaded.

    The logic behind the test was to avoid a situation where, when AD is unavailable, no one can login (even native WordPress users). I’m going to have to find a better fix for the issue, though, as the current dev implementation is most likely causing major performance issues.

    @bloofrog – For the time being, you can safely edit active-directory-authentication-integration/class-active-directory-authentication-integration.php, look for the following code block, and delete it. Any future updates that would overwrite that change will fix the issue anyway, so you don’t have to worry about losing those changes in the future.

    $tablename = $this->get_table_name();
    
    			if( $wpdb->get_var( "SHOW TABLES LIKE '" . $tablename . "'" ) != $tablename ) {
    				/**
    				 * This table is no longer used as of version 0.6, so we should remove it
    				 * 		if it exists.
    				 */
    				$wpdb->query( 'DROP TABLE IF EXISTS ' . $tablename );
    			}

    Beautiful – thank you so much for your response. I have removed this block and successfully removed the error messages.

    Thread Starter tunamaxx

    (@tunamaxx)

    @curtiss – thanks for the update. I had lumped the decreased performance in with the error log messages. Never occurred to me that they weren’t related.

    Thanks for the update.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Plugin: Active Directory Authentication Integration] Error: …Table 'DATABASENAME.wp_adauthin’ is closed to new replies.