WordPress.org

Forums

Wordfence Security
[resolved] Null MySQL error (4 posts)

  1. On the scan page, before scanning

    Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in /Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-content/plugins/wordfence/lib/wfLog.php on line 631

    That was the only visible error I found on all the wf pages, however when I clicked scan an error popped up that the tables were missing. That is related to this issue:
    http://wordpress.org/support/topic/wordfence-install-error

    Perhaps in your registration hook you can check to ensure the tables have been created and if not display a message and disable the plugin?

    http://wordpress.org/extend/plugins/wordfence/

  2. Wordfence
    Member
    Plugin Author

    Posted 3 years ago #

    We do check that tables have been created in our activation hook and create the tables if they don't exist. The check is also done every time you upgrade Wordfence through a mechanism outside the activation hook because it's unreliable. Did you manually delete the Wordfence tables? That's the only way I can see that you'd get this error.

  3. WF did NOT create the tables on install/activation. This is because your DB connector code has a bug in it that does not allow valid values for DB authentication. See the following for the code fix http://wordpress.org/support/topic/wordfence-install-error?replies=9 . This is another reason to use the built in database object rather than creating your own ;)

    Later on your code is not verifying that the tables have been successfully created. You should probably add a check to ensure the tables have been created/updated on activation/update and disable the plugin with a message to the user about how to fix it if they are not available.

  4. Wordfence
    Member
    Plugin Author

    Posted 3 years ago #

    OK that makes sense. So the connection failed to get set up and the schema was never created. I've upped the priority on this fix.

    Thanks very much for your detailed bug reports!

    Mark.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Wordfence Security
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.