dbi-users  

Missing informix error messages

m. allan noah
Thu, 14 Jan 2010 08:49:42 -0800

I have a problem with some fastcgi scripts which use DBD::Informix.

Fastcgi is like regular cgi, except the script does not exit after the
request is complete, it loops back to the beginning, and waits for a
new request. This significantly improves performance for scripts with
large startup penalties.  The scripts are single threaded, with apache
spawning new copies as required.
I am connecting and disconnecting from the db on each request.

Everything works fine, except that sql error messages can only be
found on the first pass thru the fastcgi loop. e.g.

DBD::Informix::st execute failed: SQL: -268: Unique constraint
(informix.u116_31) violated.
ISAM: -100: ISAM error: duplicate value for a record with unique key.

On the subsequent passes i get:

DBD::Informix::st execute failed: SQL: -268: <<Failed to locate SQL
error message>>
ISAM: -100: <<Failed to locate ISAM error message>>

I have dumped the environment on both passes, and they are identical,
including all the informix vars. I cannot reproduce this issue with a
command line script, so I might have to ask some apache/fastcgi
hackers too, but I thought I would start here.

allan
-- 
"The truth is an offense, but not a sin"