Title: Errors when Commenting&#8230;
Last modified: August 18, 2016

---

# Errors when Commenting…

 *  [bubs](https://wordpress.org/support/users/bubs/)
 * (@bubs)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/errors-when-commenting/)
 * 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](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 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [bubs](https://wordpress.org/support/users/bubs/)
 * (@bubs)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/errors-when-commenting/#post-144038)
 * Any ideas?
 *  [Michael Adams (mdawaffe)](https://wordpress.org/support/users/mdawaffe/)
 * (@mdawaffe)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/errors-when-commenting/#post-144039)
 * 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](http://codex.wordpress.org/Answers-Trouble_Shooting#Headers_already_sent)

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Errors when Commenting…’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [Michael Adams (mdawaffe)](https://wordpress.org/support/users/mdawaffe/)
 * Last activity: [21 years, 1 month ago](https://wordpress.org/support/topic/errors-when-commenting/#post-144039)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
