ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Internal server error message

June 10, 2011 12:54pm

Subscribe [4]
  • #1 / Jun 10, 2011 12:54pm

    dodgson

    120 posts

    Hi there, When I try to delete a post I get a 500 internal server error. On the server the error is reporting the following… Does anyone happen to know how to fix this. I can’t delete any posts without getting the error.

    A Database Error Occurred
    Error Number: 1054
    Unknown column '13' in 'where clause'
    SELECT title FROM exp_channel_titles WHERE entry_id = "13"
    Filename: D:\Production\FlyerProgram\maui2011\system\codeigniter\system\database\DB_driver.php
    Line Number: 330

    Thanks in advance

  • #2 / Jun 11, 2011 6:09pm

    Greg Salt

    3988 posts

    Hi dodgson,

    Which version and build of EE are you using? Is this a relatively new install i.e. has deleting a post ever worked without this error?

    Cheers

    Greg

  • #3 / Jun 11, 2011 9:34pm

    dodgson

    120 posts

    Hi Greg. It’s the latest build. I have never been able to delete a post. Any suggestions?

  • #4 / Jun 13, 2011 4:33am

    John Henry Donovan

    12339 posts

    odgson,

    Was this a fresh install or an upgrade from a previous version or build?
    Are you using Windows hosting or is this a local install?

  • #5 / Jun 13, 2011 10:16am

    dodgson

    120 posts

    Hi John, Yes this was a fresh install. It is windows hosting.

  • #6 / Jun 14, 2011 3:17pm

    Kevin Smith

    4784 posts

    Hi dodgson–

    Be on the lookout for an email from me.

  • #7 / Jun 16, 2011 4:29pm

    Kevin Smith

    4784 posts

    Hey dodgson–

    I think this is related to a problem with your MySQL server. When I try this query directly against your database:

    SELECT title FROM exp_channel_titles WHERE entry_id = "13"

    …it returns the same error you received above. That same query against several of my installs returns a proper return.

    That’s a pretty vanilla query, and it shouldn’t spit out an error. Could you work with your host to see if something in your MySQL setup is blocking your ability to perform that query?

  • #8 / Jun 17, 2011 2:51pm

    dodgson

    120 posts

    Hi Kevin, Thanks for the response. It’s very much appreciated. I have talked to the administrator of the server and here is his findings….

    This statement does NOT work:
    SELECT title FROM exp_channel_titles WHERE entry_id = “13”

    But this statement DOES work:
    SELECT title FROM exp_channel_titles WHERE entry_id = ‘13’

    (with single quotes)

    He thought maybe then it is a setup thing within MYSQL like this:
    http://dev.mysql.com/doc/refman/5.0/en/string-syntax.html
    But the ANSI_QUOTES SQL mode is not enabled.

    I don’t know what any of this means. Hopefully you can shed some light on it. Thanks again.

    Mark

  • #9 / Jun 19, 2011 10:11am

    Greg Salt

    3988 posts

    Hi dodgson,

    That is very odd, I’ve never seen that before. Ultimately I think your host is going to have to solve this one for you I’m afraid. Have you run an EE site on this host before? There seems to be something incorrect about your MySQL configuration and your host is best placed to diagnose and solve that. We’ll keep this thread open so please let us know what they say the problem is.

    Cheers

    Greg

  • #10 / Jun 20, 2011 2:46pm

    dodgson

    120 posts

    Hi Greg, I have been dealing with my clients Sys Admin and he changed the following item and it has fixed the issue. I’m not sure why.

    He changed the MYSQL config file “my.ini” file in which he found the ANSI quotes setting that I mentioned earlier in this thread. He made the following change to that file:

    # Set the SQL mode to strict
    OLD LINE ->  sql-mode=“STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,ANSI_QUOTES”
    NEW LINE -> sql-mode=“STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION”

    Let me know what you think, I’m curious as to why this may have happened.

  • #11 / Jun 21, 2011 3:01pm

    Brandon Jones

    5500 posts

    Hi dodgson,

    Sounds like the server simply wasn’t properly configured; Windows environments can be a bit trickier to setup. Thanks for sharing the solution and don’t hesitate to post again!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases