Fabio-
Well, for starters, I'll put this out there, you're running on an
unsupported Linux distribution. Technically, ColdFusion was _never_
certified for debian.
Next, the postgressql driver was compiled for Red Hat. More than
likely the issues you are running into are library-file related. This
indicates that you would want to recompile or download a newer driver for
PostGresSQL. So, the one you see on unix odbc, you should prolly install.
I'd reccomend downloading and installing the newer driver, and
seeing if that would solve your problems.
-Jesse
-----Original Message-----
From: Fabio Serra [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 02, 2001 9:30 AM
To: CF-Linux
Subject: Postgres and CF Bug
Hello there,
I'm running CF 5, Debian Potato, Postgres 7.1 with Unixodbc included in CF
5.
I found a lot of problems with this configuration and maybe some bug.
1) Bug 1.
When I execute a query producing a SQL error, CF Server shuts down and
restarts in one, two seconds.
In the CFAM server setting "restart at n unresponsive request" and "restart
when requests terminate abnormally " are unchecked.
The client variable are storaged in the same database where I execute the
query.
These are the logs I found:
CF server.log
Caught a fatal signal (11) - Aborting
Apache error.log
[Fri Sep 28 23:50:02 2001] [notice] caught SIGTERM, shutting down
[Sat Sep 29 08:40:36 2001] [notice] Apache/1.3.9 (Unix) Debian/GNU
configured -- resuming normal operations
[Sat Sep 29 08:40:36 2001] [notice] suEXEC mechanism enabled (wrapper:
/usr/lib/apache/suexec)
Postgres.log
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: recv() failed: Broken pipe
Unfortunately this behaviour doesn't take place in every query.
Here is an example. The following query is part of a search form. If you
put this string \' in the input tag (form.filter_one_val), the server
crashes.
<cfapplication name="Test"
clientmanagement="Yes"
sessionmanagement="Yes">
<cfquery name="qry_user_found"
datasource="testuno"
dbtype="ODBC"
username="pippo"
password="pippo">
SELECT COUNT(*) AS recordTrovati
FROM sys_user su
LEFT JOIN sys_user2sys_group su2sg ON (su.id_sys_user =
su2sg.id_sys_user)
LEFT JOIN sys_group sg ON (sg.id_sys_group = su2sg.id_sys_group)
<!--- Filters --->
WHERE upper(#filter_one#) LIKE upper('%#form.filter_one_val#%')
</cfquery>
The server also crashes when the SQL refers to a database field that
doesn't exist.
Anyway, after trying and trying I discovered that:
1. CF Server crashes only if the client variables are stored in the DB.
2. CF Server crashes only when the query refers to more than on table.
This is a real problem for me because I have no other choice than put the
client variables in the system registry.
This is a known bug or a mistake of mine?
2) Bug 2: escape character. CF doesn't escape the backslash char in the SQL
string.
Backslash is a special char in Postgres, but CF escapes only singole quote!
If you put a string like this \' in a search form and you try a
<cfquery>, the result is:
ODBC Error Code = 08S01 (Communication link failure)
Error while executing the query; ERROR: Unterminated quoted string
3) Query string too long.
Unixodbc doesn't allow to insert strings longer than 8 Kb. This is another
serious problem tha I can't solve.
In the Postgres web site there is another odbc driver that seems more
recent than unixodbc. Is this driver supported by CF? Otherwise which is
the solution to exceed the 8Kb limit? And last, why didn't Macromedia make
Merant make a driver for Postgres?
Ok, thanks in advance to everyone able to solve these problems.
Ciao.
p.s: if someone can replicate these errors and can write an english better
than mine :-( we can write to cfbughunt.org
--------------------------------------------------
FABIO SERRA - faser(at)faser.net
PGP available
--------------------------------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-linux%40houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_linux or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.