• Resolved sfjwebsfj

    (@sfjwebsfj)


    This pair of errors appears in my error_log with every page view:

    [08-Nov-2018 20:13:46 UTC] PHP Warning: Division by zero in /home/sfj/public_html/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 609
    [08-Nov-2018 20:13:46 UTC] PHP Warning: Division by zero in /home/sfj/public_html/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 688

    Here is line 609 from waf.php:

    $paddedKey = wfWAFUtils::substr(str_repeat($authKey, ceil(strlen($json) / strlen($authKey))), 0, strlen($json));

    Here is line 688 (same code):

    $paddedKey = wfWAFUtils::substr(str_repeat($authKey, ceil(strlen($json) / strlen($authKey))), 0, strlen($json));

    So, I am apparently not getting a value for $authKey. This cripples the site, it takes up to 15 seconds for anything to start loading with every click. It somehow affects any kind of AJAX operations in the same way. With Wordfence deactivated the site throws no errors and is quick.

    The plugin says “Free License Active” and shows some kind of hash code. There is a dropdown where you choose the Firewall mode: enabled, disabled, learning. It allows me to choose, but after I save the changes, the dropdown field is blank as if no option is selected. Not sure if this is related in any way.

    Any pointers greatly appreciated, thank you!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @sfjwebsfj,
    The authkey would be located in config.php in wflogs. Sounds like the config.php has become corrupt somehow. Can you try deleting wflogs folder (which is located in wp-content) and allow it to be recreated to see if that fixes the problem?

    • This reply was modified 6 years, 4 months ago by wfasa.
    Thread Starter sfjwebsfj

    (@sfjwebsfj)

    I deleted the entire wflogs folder from wp-content. Thank you, that seems to have fixed it. In the config.php file, I could see where the serialized array was broken. Don’t know why, but I’ll watch it. Thank you again!

    Hi @sfjwebsfj!
    That’s good news thanks for the update!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Wordfence Division by Zero’ is closed to new replies.