Support » Fixing WordPress » Akismet causing wp-db.php problem after 3.5 upgrade

  • Resolved froomkin


    I’m getting the message

    Warning: Missing argument 2 for wpdb::prepare(), called in […]/ wp-content/plugins/akismet/admin.php on line 332 and defined in […]/wp-includes/wp-db.php on line 990

    on my comments page in the dashboard.

    Below that it says

    Akismet has detected a problem. Some comments have not yet been checked for spam by Akismet. They have been temporarily held for moderation. Please check your Akismet configuration and contact your web host if problems persist.

    I read the sticky at Troubleshooting WordPress 3.5 Master List, but my situation seems different from the wp-db.php issues discussed there, since the plugin that seems to be causing my problem is not a third-party plugin but one that ships with WordPress itself — Akismet.

    Originally I did an automatic update (with all the plugins turned off). After seeing the warning messages quoted above, I tried manually re-uploading the files for akismet vis sftp; no change. I also re-uploaded the files for the …/wp-includes directory. No change.

    Disabling akismet makes the warning messages go away. But obviously I don’t want to do that.

    My theme at is 2010 (now upgraded to ver 1.5) with a very modest child theme on top of it, and the child just has some pretty simple css in it. In any case changing to to 2013 didn’t solve the problem either.

    The line in akismet that is being flagged reads

    $waiting = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->commentmeta WHERE meta_key = 'akismet_error'" ) );

    I don’t have the skills or courage to edit it.

    My site is hosted on a VPS at Dreamhost.

    I was able to post a test comment, so that much is working. And as far as I can tell Akismet is workig too. It’s actually only my second line of defense; the bulk of the spam I get is blocked by wordpress hashcash.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Drew Jaynes


    WordPress Core Developer

    Hi froomkin,

    I’d suggest contacting the Akismet folks over in their forum.

    You can refer them to this link:

    In the mean time, you can hide the error by opening your wp-config.php file and adding these lines:

    ini_set( 'display_errors', false );
    error_reporting( 0 );


    Where in your wp-config.php file do you add this code?

    I am using a 3D FTP text editor via FTP

    Thanks for any pointers

    “Edited” All sorted now, no need to reply.



    Forum Moderator

    As per the Forum Welcome, please post your own topic. Posting in an existing topic prevents us from being able to track issues by topic. Added to which, your problem – despite any similarity in symptoms – is likely to be completely different.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Akismet causing wp-db.php problem after 3.5 upgrade’ is closed to new replies.