Title: Comment Page (Database) Errors
Last modified: August 18, 2016

---

# Comment Page (Database) Errors

 *  [bk](https://wordpress.org/support/users/bk/)
 * (@bk)
 * [20 years, 8 months ago](https://wordpress.org/support/topic/comment-page-database-errors/)
 * When your try to post a comment on my site, you get a database error in wp-comments-
   post.php file. Can someone tell me what’s going wrong? 🙁

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

 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [20 years, 8 months ago](https://wordpress.org/support/topic/comment-page-database-errors/#post-238326)
 * When did this start, and what did you change just before it happened ?
 *  Thread Starter [bk](https://wordpress.org/support/users/bk/)
 * (@bk)
 * [20 years, 8 months ago](https://wordpress.org/support/topic/comment-page-database-errors/#post-238327)
 * I just added the default gravatar in the comment preview yesterday. After that,
   I didn’t test if the comments were working (How stupid of me!). Just right now,
   a friend of mine posted a comment and he told me that it’s displaying an error.
 * The problem could be in the default gravatar that I added in the comment preview.
 *  Thread Starter [bk](https://wordpress.org/support/users/bk/)
 * (@bk)
 * [20 years, 8 months ago](https://wordpress.org/support/topic/comment-page-database-errors/#post-238330)
 * I just removed that default gravatar from the comment preview.
    The problem still
   exists. Do you think I should create a new/repair MySQL Database?
 * I am also getting errors when I try to delete a comment.
 *  Thread Starter [bk](https://wordpress.org/support/users/bk/)
 * (@bk)
 * [20 years, 8 months ago](https://wordpress.org/support/topic/comment-page-database-errors/#post-238333)
 * And I also installed PluginsUsedPlugin and RunPHP Plugin.
 *  Thread Starter [bk](https://wordpress.org/support/users/bk/)
 * (@bk)
 * [20 years, 8 months ago](https://wordpress.org/support/topic/comment-page-database-errors/#post-238347)
 * Can someone please help?!
 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [20 years, 8 months ago](https://wordpress.org/support/topic/comment-page-database-errors/#post-238348)
 * Have you UNinstalled everything you put in ??
 *  Thread Starter [bk](https://wordpress.org/support/users/bk/)
 * (@bk)
 * [20 years, 8 months ago](https://wordpress.org/support/topic/comment-page-database-errors/#post-238350)
 * Yes, podz, I have. Uninstalled everything that I put in last night. Still getting
   errors. What now? 🙁
 * And sorry, I accidently deleted your comment.
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [20 years, 8 months ago](https://wordpress.org/support/topic/comment-page-database-errors/#post-238364)
 * Would you please quote the error? We aren’t psychics.
 *  Thread Starter [bk](https://wordpress.org/support/users/bk/)
 * (@bk)
 * [20 years, 8 months ago](https://wordpress.org/support/topic/comment-page-database-errors/#post-238369)
 * **Sorry. Here’s the error when you try to leave a comment. **
 * _
    WordPress database error: [You have an error in your SQL syntax. Check the
   manual that corresponds to your MySQL server version for the right syntax to 
   use near ” at line 3] SELECT post\_id FROM wp\_post2cat WHERE category\_id =
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/xeenat0/public_html/wp-includes/wp-db.php:98) in /home/xeenat0/public_html/
   wp-comments-post.php on line 51
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/xeenat0/public_html/wp-includes/wp-db.php:98) in /home/xeenat0/public_html/
   wp-comments-post.php on line 52
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/xeenat0/public_html/wp-includes/wp-db.php:98) in /home/xeenat0/public_html/
   wp-comments-post.php on line 53
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/xeenat0/public_html/wp-includes/wp-db.php:98) in /home/xeenat0/public_html/
   wp-comments-post.php on line 55
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/xeenat0/public_html/wp-includes/wp-db.php:98) in /home/xeenat0/public_html/
   wp-comments-post.php on line 56
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/xeenat0/public_html/wp-includes/wp-db.php:98) in /home/xeenat0/public_html/
   wp-comments-post.php on line 57
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/xeenat0/public_html/wp-includes/wp-db.php:98) in /home/xeenat0/public_html/
   wp-comments-post.php on line 58
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/xeenat0/public_html/wp-includes/wp-db.php:98) in /home/xeenat0/public_html/
   wp-includes/pluggable-functions.php on line 129
 * **And here’s the error when I try to delete a comment.**
 * _
    WordPress database error: [You have an error in your SQL syntax. Check the
   manual that corresponds to your MySQL server version for the right syntax to 
   use near ” at line 3] SELECT post\_id FROM wp\_post2cat WHERE category\_id =
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/xeenat0/public_html/wp-includes/wp-db.php:98) in /home/xeenat0/public_html/
   wp-admin/post.php on line 556
 * **Thank you, in advance for your help.**
 *  Thread Starter [bk](https://wordpress.org/support/users/bk/)
 * (@bk)
 * [20 years, 8 months ago](https://wordpress.org/support/topic/comment-page-database-errors/#post-238382)
 * Should I try and repair the MySQL database in my CPanel?
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [20 years, 8 months ago](https://wordpress.org/support/topic/comment-page-database-errors/#post-238383)
 * First, disable all of your plugins, then switch to the WordPress Default Theme(
   or the WordPress Classic Theme if you are already using the Default Theme). Do
   you see any improvement?
 * Yes, try to Repair and Optimize your database too. You can do this by accessing
   the database via phpmyadmin.
 *  Thread Starter [bk](https://wordpress.org/support/users/bk/)
 * (@bk)
 * [20 years, 8 months ago](https://wordpress.org/support/topic/comment-page-database-errors/#post-238385)
 * Disabled all the plugins. Switched to WordPress Classic Theme and it works perfect
   now.
 * So I’m guessing the problem was in one of the plugins?
 *  Thread Starter [bk](https://wordpress.org/support/users/bk/)
 * (@bk)
 * [20 years, 8 months ago](https://wordpress.org/support/topic/comment-page-database-errors/#post-238387)
 * Hah, the Extended Live Archive Plugin was causing the problem, I think…

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

The topic ‘Comment Page (Database) Errors’ is closed to new replies.

## Tags

 * [mysql errors](https://wordpress.org/support/topic-tag/mysql-errors/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 13 replies
 * 3 participants
 * Last reply from: [bk](https://wordpress.org/support/users/bk/)
 * Last activity: [20 years, 8 months ago](https://wordpress.org/support/topic/comment-page-database-errors/#post-238387)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
