[imp] "Invalid SQL" error cause
Rich Lafferty
rich@horde.org
Thu, 19 Oct 2000 23:48:02 -0400
On Thu, Oct 19, 2000 at 07:39:22PM -0700, Hugh Hinskens (hinskens@camosun.bc.ca) wrote:
> Re: IMP v.2.2.3, PHP v.4.0.3pl1, Horde v.1.2.0-pre14
>
> After spending many hours trying to determine the reason for the following
> error (including searching the horde mailing list archives):
>
> Database error (HordeDB): Invalid SQL: SELECT val FROM active_sessions WHERE
> sid = '216e0eb6a19e7a6f35ca10702087d46e' AND name = 'HordeSession'
[database name was incorrect]
> Unfortunately, the error message gives no indication that this might be the
> problem.
It's all a case of where you look; I'm almost certain that your
*database's* logs will mention that you tried to connect to a database
that doesn't exist. As with most programming problems, one always
needs to fix the first error first, since that problem might cause the
rest of the errors; in this case, the first error was the nonexistant
database, and the "Invalid SQL" was invalid because there was no
database connection across which to execute it.
I noticed there were many messages in the archives mentioning this
> problem and it is distinct from the "mysql/freeze" problem.
Unfortunately, all the error above says is "I couldn't execute this" --
there are probably hundreds of ways in which things could be slightly
awry with IMP's configuration or with the database (or the network,
or..) that would cause an SQL statement not to execute. :-/
It's sort of the database equivalent of a web browser's "Document
contains no data" -- it's saying "I tried to do this, and it didn't
work", with no indication as to why -- only a hint that there's
another database-related error elsewhere.
-Rich
--
------------------------------ Rich Lafferty ---------------------------
Sysadmin/Programmer, Instructional and Information Technology Services
Concordia University, Montreal, QC (514) 848-7625
------------------------- rich@alcor.concordia.ca ----------------------