Tom Donovan wrote:
Steve Whitson wrote:

When I start the server I get the following error:

[notice] Apache/2.2.9 (Unix) DAV/2 PHP/5.2.6 SVN/1.5.1 configured --
resuming normal operations
[info] Server built: Aug 7 2008 11:06:05
[debug] prefork.c(1001): AcceptMutex: fcntl (default: fcntl)
[error] (20014)Internal error: DBD: failed to prepare SQL
statements:
Unknown command
[error] (20014)Internal error: DBD: failed to initialise


Since you get to the point of preparing your SQL statement when the error occurs, apache has already successfully connected to your mysql database. This pretty much rules out missing libraries, etc.

The problem seems to be that mysql is returning "Unknown command" in response to your SQL statement:

 "select password from users where name = %s"

The apache part of the error message is as expected, but the mysql-supplied part of the message is "Unknown command". FYI - this is what a log entry for an invalid SQL statement looks like:

[Fri Aug 15 07:35:09 2008] [error] (20014)Internal error: DBD: failed to prepare SQL statements: 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 'selectXX password from users where name = ?' at line 1 [Fri Aug 15 07:35:09 2008] [error] (20014)Internal error: DBD: failed to initialise

You are using mysql version 5.0, right?

-tom-
The version of mysql apache is building against is 5.0.37. The server I'm connecting (which should not be the issue) is 4.0.11a (I hope to upgrade this year).

I've tried changing the connect info to something that won't work, which as expected gives me a connection error.... so as you point out the connection is occurring. As you stated, for some reason the query is failing, yet works from other clients just fine.

Thanks much,
   -Steve


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to