Problems with ESQL-C as CGI-Script
Posted in 1999
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Hi! If i compile a "hello world"-cgi-program with a c-compiler, i have no problems running the program from a browser, but compiling the same code with the esqlc-Compiler of Informix causes an runtime-error (the www-server-logfile always says "connection interrupted [SIGPIPE]"). Has anyone of you heard of this problem in your domain? Thanks for all answers. ciao edgar
Edgar Merl wrote: > If i compile a "hello world"-cgi-program with a c-compiler, i have no > problems running the program from a browser, but compiling the same > code with the esqlc-Compiler of Informix causes an runtime-error (the > www-server-logfile always says "connection interrupted [SIGPIPE]"). > Has anyone of you heard of this problem in your domain? Just about any time anybody mentions web server and ESQL/C program and problem in the same sentence, the answer is 'environment'. Specifically, unless you've taken steps to ensure that the web server is giving your ESQL/C application an Informix-aware environment (eg INFORMIXSERVER at minimum, usually INFORMIXDIR too, and usually LD_LIBRARY_PATH) then the ESQL/C program will fail to locate the Informix material it needs to run. -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h>
Edgar Merl wrote: > code with the esqlc-Compiler of Informix causes an runtime-error (the > www-server-logfile always says "connection interrupted [SIGPIPE]"). > Has anyone of you heard of this problem in your domain? > Hello Edgar, i know this message, if i for example try to read from a socket connection while the sender is terminating the connection. I don´t see esql in these context. To avoid this message i use: signal(SIGPIPE, SIG_IGN); Or see the man-pages from sigaction( sa_flags = SA_RESTART ...) I hope this helps. Martin
On Sat, 29 May 1999 14:18:43 -0700, Jonathan Leffler <jleffler@earthlink.net> wrote: >Edgar Merl wrote: >> If i compile a "hello world"-cgi-program with a c-compiler, i have no >> problems running the program from a browser, but compiling the same >> code with the esqlc-Compiler of Informix causes an runtime-error (the >> www-server-logfile always says "connection interrupted [SIGPIPE]"). >> Has anyone of you heard of this problem in your domain? > >Just about any time anybody mentions web server and ESQL/C >program and problem in the same sentence, the answer is 'environment'. > >Specifically, unless you've taken steps to ensure that the web server >is giving your ESQL/C application an Informix-aware environment (eg >INFORMIXSERVER at minimum, usually INFORMIXDIR too, and usually >LD_LIBRARY_PATH) then the ESQL/C program will fail to locate the >Informix material it needs to run. > >-- >Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) >Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN >#include <disclaimer.h> > You were absolutely right, this was in fact the problem. Many thanks ciao Edgar