Informix dbaccess output - what's happening here?
Posted in 1997
Topics: Server Administration
I have written a perl CGI script which uses this construct to access an
informix database:
@output = `echo 'select * from table' | $dbaccess $database_name -`;
This works fine.
However:
STDIO captures the query information returned, which I would expect.
Nearly all of the additional Informix messages are captured with STDERR.
And that's the problem - nearly all.
("Opening database. 1 row(s) returned. Database closed.")
It seems that the first access I make to the database produces a message
by dbaccess which I can't capture - and this makes its way through the
web server to the browser! (Incidentally, I cannot capture the initial
dbaccess output from the command line, either).
Is there a way of suppressing Informix messages, or at least capture the
spurious message? I have searched the web, FAQs and even (at the height
of despiration) the supplied Informix documentation - but I have not
found anything which might equate to a 'quiet' mode, or any other
solution.
I am using DB-Access Version 7.20.UC2, with Perl 5.004. I cannot use DBI,
as there is not a compiler on the machine I am using (don't ask).
Has anyone witnessed this behaviour before? Have I missed an important
FAQ? Have I missed something blindingly obvious?
Please help!
Chris Carline
chris@bluewave.com