WordPress.org

Ready to get started?Download WordPress

Forums

Database error when a comment is posted. (17 posts)

  1. abohart
    Member
    Posted 8 years ago #

    I get the following errors when someone posts 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 'WHERE comment_ID = 36' at line 1]

    UPDATE wp_comments SET comment_reply_ID= WHERE comment_ID = 36;

    Warning: Cannot modify header information - headers already sent by (output started at /nfsn/content/philatelictidbits/htdocs/wp-includes/wp-db.php:98) in /nfsn/content/philatelictidbits/htdocs/wp-comments-post.php on line 44

    [Repeat errors]

    Any idea on how to fix this?

  2. ColdForged
    Member
    Posted 8 years ago #

    Sounds like you have some sort of threaded comments plugin enabled but without the appropriate change to the tables.

  3. abohart
    Member
    Posted 8 years ago #

    Well, I do have a threaded comments plugin enabled, but I don't recall there being any need for a change to the tables. I will check on that.

  4. abohart
    Member
    Posted 8 years ago #

    Okay, it is definitely connected with the threaded comments plugin, as the problem disappears when I disable it. I am using Brian's threaded comments. How do I get it to work again? It used to work before I switched to the Equix theme.

  5. Ajay
    Member
    Posted 8 years ago #

    But, I get this problem even without this threaded plugins.

    Is it because of Spam Karma?

  6. Mark (podz)
    Support Maven
    Posted 8 years ago #

    I have never seen this error with SK/SK2.
    Have you altered any core files ?
    Tried running upgrade.php ?

  7. Ajay
    Member
    Posted 8 years ago #

    No i haven't editted any core files.

    Should I run upgrade.php again? I am using 1.5.1

    http://www.ajaydsouza.com

  8. Ajay
    Member
    Posted 8 years ago #

    I ran upgrade.php again.

    Can you post a comment on my blog and see what you get?

  9. Mark (podz)
    Support Maven
    Posted 8 years ago #

    Posted, no error :)

  10. Ajay
    Member
    Posted 8 years ago #

    Checked..... hopefully it doesn't return......

    Scratches head.

    Thanks for testing :)

  11. Ajay
    Member
    Posted 8 years ago #

    Damn it returned when I posted.

    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 't return.' LIMIT 1' at line 1]
    SELECT comment_ID FROM wp_comments WHERE comment_post_ID = '298' AND ( comment_author = 'Ajay' OR comment_author_email = 'me@ajaydsouza.com' ) AND comment_content = 'So far so good. Hopefully, it doesn't return.' LIMIT 1

    Warning: Cannot modify header information - headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 51

    Warning: Cannot modify header information - headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 52

    Warning: Cannot modify header information - headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 53

    Warning: Cannot modify header information - headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 55

    Warning: Cannot modify header information - headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 56

    Warning: Cannot modify header information - headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 57

    Warning: Cannot modify header information - headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 58

    Warning: Cannot modify header information - headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-includes/pluggable-functions.php on line 129

  12. moshu
    Member
    Posted 8 years ago #

  13. Ajay
    Member
    Posted 8 years ago #

    Already tried that moshu several times.
    The files don't have any spaces

  14. Ajay
    Member
    Posted 8 years ago #

    Now it doesn't seem to be coming.
    Is this some random occurence?

  15. Mark (podz)
    Support Maven
    Posted 8 years ago #

    If you have a spam blacklist, check it for spaces / wierd characters.
    Does your email address have any wierd characters ?
    Does this happen if you post with one address and not another ?
    Are you running the latest version of SK for your install ?

  16. Ajay
    Member
    Posted 8 years ago #

    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 's fixed now hopefully. Thanks for the ErrorDocument SELECT comment_ID FROM wp_comments WHERE comment_post_ID = '302' AND ( comment_author = 'Ajay' OR comment_author_email = 'me@ajaydsouza.com' ) AND comment_content = 'I have gotten the site working again. For some reason the .htaccess file disappeared. It's fixed now hopefully. Thanks for the ErrorDocument code. I have added that to the .htaccess Now I guess you can link to the plugin. I have also released the plugin via WP-Plugin manager. Lastly, who did you find the id of my post?' LIMIT 1

    Warning: Cannot modify header information - headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 51

    Warning: Cannot modify header information - headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 52

    Warning: Cannot modify header information - headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 53

    Warning: Cannot modify header information - headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 55

    Warning: Cannot modify header information - headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 56

    Warning: Cannot modify header information - headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 57

    Warning: Cannot modify header information - headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 58

    Warning: Cannot modify header information - headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-includes/pluggable-functions.php on line 129

    Running the latest version of SK2 and wP.

  17. Ajay
    Member
    Posted 8 years ago #

    Has not happened in a while, but it is back again!

    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 've really not written any teachings but just what I learn from ]
    SELECT comment_ID FROM wp_comments WHERE comment_post_ID = '318' AND ( comment_author = 'Ajay' OR comment_author_email = 'me@ajaydsouza.com' ) AND comment_content = 'Believer in? If you are talking being a Catholic, yes I am one. I've really not written any teachings but just what I learn from others, that too in brief. And, thanks for the compliment :)' LIMIT 1

    Warning: Cannot modify header information - headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 51

    Warning: Cannot modify header information - headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 52

    Warning: Cannot modify header information - headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 53

    Warning: Cannot modify header information - headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 55

    Warning: Cannot modify header information - headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 56

    Warning: Cannot modify header information - headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 57

    Warning: Cannot modify header information - headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-comments-post.php on line 58

    Warning: Cannot modify header information - headers already sent by (output started at /home/ajay82/public_html/wp-includes/wp-db.php:98) in /home/ajay82/public_html/wp-includes/pluggable-functions.php on line 129

    I realized that I wrote the word "I've" and the error starts after the apostrophe. Any workaround to this?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.