WordPress.org

Ready to get started?Download WordPress

Forums

Database Error when comment contains apostrophe ' (10 posts)

  1. Ajay
    Member
    Posted 9 years ago #

    with reference to http://wordpress.org/support/topic/32096

    I figured out that whenever the comment has an apostrophe ('), then it causes a database error.

    How do I solve this problem?

  2. MichaelH
    Member
    Posted 9 years ago #

    I orginally started to ask if one of your plugins was causing this but maybe it's related to this:

    Header already sent error at Codex

  3. Ajay
    Member
    Posted 9 years ago #

    That was the first thing I tried that.

    None of the files have extra spaces.

  4. Ajay
    Member
    Posted 9 years ago #

    Any solution to this problem?

    Is there some way to process the comment content to check if there are apostrophe?

    Would the escape function of php do it?

    Could this problem be because of Spam Karma 2?

  5. Cypher
    Member
    Posted 9 years ago #

    I don't believe SK2 has anything to do with it. I have comments on my site which have apostrophe in them and I don't have the same problem.

    Is it possibly a server config issue or PHP config issue?

    Regards

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

    What plugins are you using ?

  7. Ajay
    Member
    Posted 9 years ago #

    I wouldnt know about server config or PHP config.

    What about magic quotes or something?

    And podz, the plugins that directly apply to the postpage are:

    Text Control
    Subscribe To Comments
    SK2
    Unfancy Quote
    No Duplicate Comments
    Live Comment Preview
    Gravatar Signup
    Comment Quicktags

    Could it be one of these?

  8. Ajay
    Member
    Posted 9 years ago #

    Please help.

    Is there some way for me to remove / escape or add a \ in front of apostrphes in my comment form?

  9. Minna
    Member
    Posted 9 years ago #

    I got the database error with No Duplicate Comments plugin; I told the plugin author and I think the newest version has corrected the problem. What version do you have? It should be v0.9.2

  10. Ajay
    Member
    Posted 9 years ago #

    Thanks :)

    I had 0.9
    Now got it updated.

    I guess, I lapsed on checking for update of all the plugins!

    Problems seems to have gone for now.... Hopefully, it doesnt return

Topic Closed

This topic has been closed to new replies.

About this Topic