Title: default install gives sql/headers error on comment
Last modified: August 18, 2016

---

# default install gives sql/headers error on comment

 *  kani
 * [21 years, 7 months ago](https://wordpress.org/support/topic/default-install-gives-sqlheaders-error-on-comment/)
 * >  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 ‘
   > WHERE comment_author_email = ” ORDER BY comment_date DESC LIMI]
   >  SELECT comment_date
   > FROM WHERE comment_author_email = ” ORDER BY comment_date DESC LIMIT 1 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 ‘WHERE comment_author_url
   > = ‘[http://jael.bluewire.net.nz&#8217](http://jael.bluewire.net.nz&#8217); 
   > ORDER ] SELECT comment_date FROM WHERE comment_author_url = ‘[http://jael.bluewire.net.nz&#8217](http://jael.bluewire.net.nz&#8217);
   > ORDER BY comment_date DESC LIMIT 1 Warning: Cannot modify header information–
   > headers already sent by (output started at /home/hosted/kani/jael.bluewire.
   > net.nz/public_html/wp-includes/wp-db.php:80) in /home/hosted/kani/jael.bluewire.
   > net.nz/public_html/wp-comments-post.php on line 89 This happens when you click
   > submit and post a new comment. The comment is posted fine, but you get this
   > mess instead of being sent back to the comments list. I am using a default 
   > 1.2.1 installation with a slightly-modified index.php and wp-comments.php. 
   > I’ve never touched wp-db.php or wp-comments-post.php (or indeed any files except
   > wp-config.php, index.php and comments.php). There is no extra whitespace in
   > vars.php. Can anyone see the problem?

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

 *  [estara](https://wordpress.org/support/users/estara/)
 * (@estara)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/default-install-gives-sqlheaders-error-on-comment/#post-106905)
 * Hmm, something similar happens to me but I use 1.3 alpha-2, and I have tried 
   to fiddle with some Post plugins, mainly Alex Kings Last Visit. However, I uploaded
   original files from the installation when that only got me major errors and then
   implemented Recent Comments by MTDewvirus.
    Like you said, you get an error and
   then you can still read the comment afterwards. My error looks a bit different
   though. Quote: `Warning: Unknown modifier ‘C’ in /www/htdocs/marhaba/wp-includes/
   functions.php on line 1415′ (Repeat errors) Are some of our permissions wrong?
   I have never touched functions.php though…
 *  Thread Starter Anonymous
 * [21 years, 7 months ago](https://wordpress.org/support/topic/default-install-gives-sqlheaders-error-on-comment/#post-106926)
 * Running upgrade.php returns:
 * > Fatal error: Cannot redeclare maybe_add_column() (previously declared in /home/
   > hosted/kani/jael.bluewire.net.nz/public_html/wp-content/plugins/subscribe-to-
   > comments.php:252) in /home/hosted/kani/jael.bluewire.net.nz/public_html/wp-
   > admin/upgrade-functions.php on line 56
 * :\
 *  [estara](https://wordpress.org/support/users/estara/)
 * (@estara)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/default-install-gives-sqlheaders-error-on-comment/#post-107089)
 * Podz, I love you. That was exactly what was wrong:
    [http://www.bookish.net/archives/2004/11/06/an-ode-to-worpress-support](http://www.bookish.net/archives/2004/11/06/an-ode-to-worpress-support)
   I can’t even spell ; ;
 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/default-install-gives-sqlheaders-error-on-comment/#post-107091)
 * [@kani](https://wordpress.org/support/users/kani/) – deactivate that plugin, 
   then run the upgrade ?
    [@estara](https://wordpress.org/support/users/estara/)–
   I’m blushing 🙂
 *  Thread Starter Anonymous
 * [21 years, 7 months ago](https://wordpress.org/support/topic/default-install-gives-sqlheaders-error-on-comment/#post-107126)
 * podz: I disabled the plugin, ran upgrade.php again, and it still gives the same
   errors when you post a new comment 🙁
 *  Thread Starter Anonymous
 * [21 years, 7 months ago](https://wordpress.org/support/topic/default-install-gives-sqlheaders-error-on-comment/#post-107241)
 * *bump*
    still not fixed, need ideas please 🙂
 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/default-install-gives-sqlheaders-error-on-comment/#post-107245)
 * Is your blog new to wp ? I ask because of the archives, and I’m wondering if 
   you have recently installed a plugin that could have caused this ?
 *  Thread Starter Anonymous
 * [21 years, 7 months ago](https://wordpress.org/support/topic/default-install-gives-sqlheaders-error-on-comment/#post-107250)
 * No. I was using some older version of wordpress (0.71?), and finally upgraded
   last week.
 *  Thread Starter Anonymous
 * [21 years, 7 months ago](https://wordpress.org/support/topic/default-install-gives-sqlheaders-error-on-comment/#post-107263)
 * I’ve fixed it. I found the erroneous SQL statements in two plugins; Charles Gagalac’s
   _Flood Protection by email_ and _Flood Protection by URL_. Thanks for your help
   podz! 🙂

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

The topic ‘default install gives sql/headers error on comment’ is closed to new 
replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 9 replies
 * 3 participants
 * Last reply from: Anonymous
 * Last activity: [21 years, 7 months ago](https://wordpress.org/support/topic/default-install-gives-sqlheaders-error-on-comment/#post-107263)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
