• Resolved annieici

    (@annieici)


    Hello, I’m hoping you can help me determine what is happening with this file.

    I have a website that has been getting this error in the log for days. While I’ve found that this error usually means a php file needs fixed, I’m not sure what about this one needs to be fixed. It thankfully doesn’t appear to be impacting the functionality of the site, but I’d like to resolve it.

    Below is the error I’m seeing every few minutes:

    PHP Warning: Cannot modify header information – headers already sent in …/public_html/wp-content/plugins/wordfence/lib/wfUtils.php on line 2489

    Then in the file line 2489 is:

    if (version_compare(PHP_VERSION, ‘5.2.0’) >= 0) {
    setcookie($name, $value, $expire, $path, $domain, $secure, $httpOnly);
    }

    Most other versions of this error have mention of a second file where the header is also set, but I’m not seeing it here. Could you help guide me on what I need to do here?

    Thank you

    • This topic was modified 3 months, 2 weeks ago by annieici.
Viewing 1 replies (of 1 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @annieici, thanks for your question.

    The “…headers already sent” message is linked to another plugin, theme, or custom code loading WordPress core files out of order. Wordfence usually loads after PHP, but before the rest of WordPress when in Extended Protection to make blocks as early as possible. If something else is sending the headers first, Wordfence’s attempt to could be logged in this way.

    Deactivating your other plugins and reverting to a default WordPress theme while keeping Wordfence enabled may help narrow it down. If the site starts to work without logging this message, find the cause by reenabling your other plugins and theme one-by-one until the warning returns.

    Let us know what you find out,
    Peter.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.