Forums

Errors when Commenting... (3 posts)

  1. Bubs
    Member
    Posted 4 years ago #

    I offered to help a friend out with a problem she was having with her weblog. Turns out, I have no clue what is going on. I'm a noob to WP myself ;) hehe

    Anyways, she's getting the following errors when someone tries to post a comment:
    http://www.bubblessoc.net/images/errors.gif

    functions.php lines 1355-1359:

    if ( preg_match($pattern, $author) ) return false;
    if ( preg_match($pattern, $email) ) return false;
    if ( preg_match($pattern, $url) ) return false;
    if ( preg_match($pattern, $comment) ) return false;
    if ( preg_match($pattern, $user_ip) ) return false;

    wp-comments-post.php lines 90-102:

    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");

    Anyone have a guess what could be the problem? She said that she hasn't installed any hacks. I'm assuming it has something to do with the fact that she has her WP files installed in a separate directory from the root.

    Please let me know if you can assist me! Thanks in advance :)

  2. Bubs
    Member
    Posted 4 years ago #

    Any ideas?

  3. mdawaffe
    Member
    Posted 4 years ago #

    Looks like a whitespace issue. Make sure there's no spaces or empty lines or tabs or any whitespace before the first <?php or after the last ?> in the files it mentions.

    http://codex.wordpress.org/Answers-Trouble_Shooting#Headers_already_sent

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.