• It appears the error message I’m getting involves two different files and I’m not sure which one I should edit. Any idea?
    After a visitor types up a comment and clicks: “Say it!”, this is what they see:
    Warning: Cannot modify header information – headers already sent by (output started at /home/wumpc14/public_html/wumpblog/wp-content/plugins/wp-last-visit.php:282) in /home/wumpc14/public_html/wumpblog/wp-comments-post.php on line 89
    Warning: Cannot modify header information – headers already sent by (output started at /home/wumpc14/public_html/wumpblog/wp-content/plugins/wp-last-visit.php:282) in /home/wumpc14/public_html/wumpblog/wp-comments-post.php on line 90
    Warning: Cannot modify header information – headers already sent by (output started at /home/wumpc14/public_html/wumpblog/wp-content/plugins/wp-last-visit.php:282) in /home/wumpc14/public_html/wumpblog/wp-comments-post.php on line 91
    Warning: Cannot modify header information – headers already sent by (output started at /home/wumpc14/public_html/wumpblog/wp-content/plugins/wp-last-visit.php:282) in /home/wumpc14/public_html/wumpblog/wp-comments-post.php on line 93
    Warning: Cannot modify header information – headers already sent by (output started at /home/wumpc14/public_html/wumpblog/wp-content/plugins/wp-last-visit.php:282) in /home/wumpc14/public_html/wumpblog/wp-comments-post.php on line 94
    Warning: Cannot modify header information – headers already sent by (output started at /home/wumpc14/public_html/wumpblog/wp-content/plugins/wp-last-visit.php:282) in /home/wumpc14/public_html/wumpblog/wp-comments-post.php on line 95
    Warning: Cannot modify header information – headers already sent by (output started at /home/wumpc14/public_html/wumpblog/wp-content/plugins/wp-last-visit.php:282) in /home/wumpc14/public_html/wumpblog/wp-comments-post.php on line 96
    Warning: Cannot modify header information – headers already sent by (output started at /home/wumpc14/public_html/wumpblog/wp-content/plugins/wp-last-visit.php:282) in /home/wumpc14/public_html/wumpblog/wp-comments-post.php on line 101

Viewing 9 replies - 1 through 9 (of 9 total)
  • What plugins are you using?

    Thread Starter danithew

    (@danithew)

    I’ve got most or all of Alex King’s plugins going on, though I haven’t gotten them all functioning yet… from the error message, this looks like the wp-last-visit plugin is involved.

    Thread Starter danithew

    (@danithew)

    I look at this and I’ve got to think that there are commands for headers in two different files that are clashing. Maybe I should just get rid of one of the commands? I feel like a monkey with a scalpel entering the OR here. But if you get a thousand monkeys doing surgery, one of them will perform a successful heart transplant … or something like that.

    Thread Starter danithew

    (@danithew)

    looks like one of the complaints is regarding headers and wp-comments-post.php. It looks like the end of the code on that page has a lot of stuff going on with headers that could be triggering these error messages. Can I remove any of this without regretting it?
    this is the code I see that must be causing the problem:
    setcookie(‘comment_author_’ . $cookiehash, $author, time() + 30000000, COOKIEPATH);
    setcookie(‘comment_author_email_’ . $cookiehash, $email, time() + 30000000, COOKIEPATH);
    setcookie(‘comment_author_url_’ . $cookiehash, $url, time() + 30000000, COOKIEPATH);
    header (‘Expires: Mon, 26 Jul 1997 05:00:00 GMT’);
    header (‘Last-Modified: ‘ . gmdate(‘D, d M Y H:i:s’) . ‘ GMT’);
    header (‘Cache-Control: no-cache, must-revalidate’);
    header (‘Pragma: no-cache’);
    $location = (empty($_POST[‘redirect_to’])) ? $_SERVER[“HTTP_REFERER”] : $_POST[‘redirect_to’];
    if ($is_IIS) {
    header(“Refresh: 0;url=$location”);
    } else {
    header(“Location: $location”);
    }
    ?>

    “Headers already sent” plus that bit just above ?
    I’d check the last visit plugin / file – it sets cookies.

    Thread Starter danithew

    (@danithew)

    I’m just trying to decide what I’m supposed to get rid of … the cookies? A particular header command? I’ll have to tinker with this a bit I think.

    It’s the first error which is causing the snowball into more.
    Download wp-last-visit.php, and open it up in a text editor and then do the full checking for whitespace.
    Check also that if you inserted any information, you didn’t have a leading space in that entry.

    Thread Starter danithew

    (@danithew)

    Podz,
    Thanks for pointing me to that specific file and mentioning “white space.” That was the problem. It was so easy to fix once I knew what to look for. How embarassing.
    I’m going to brand it on my brain: “check for white space at the end of files!”

    At least it works ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘comments error’ is closed to new replies.