Re: how to web connect using esqlc.. cgi
Posted in 1999
Jinyeol Hwang wrote: > > Hi, there! > > please help me~!!. > > I want web connect using esqlc. > (select options from some form -> search values in DB -> display values in > Web) > > my environment is > OS: RedHat 5.2 > DB: Informix Dynamic Server V 7.30.U / ESQL V 9.16.UC2 > Webserver: Apache 1.3.3 > > I declare in srm.conf > PassEnv INFORMIXDIR > PassEnv INFORMIXSERVER > PassEnv LD_LIBRARY_PATH Are these variables set when the Apache server is started? Use the cgi-bin/printenv script (you probably need to make it executable) to determine what the environment of your CGI scripts really is. I'd probably use SetEnv rather than PassEnv. > and declare in test.ec > > printf("Content type:text/html\\n\\n"); > putenv("INFORMIXDIR=/usr/informix"); > putenv("INFORMIXSERVER=niic"); > putenv("LD_LIBRARY_PATH=/usr/informix/lib:/usr/informix/lib/esql:"); > > It's successfully done In sh but don't in Web. > SQLSTATE is 024000. Hmm; in general, it is easiest to debug problems if you quote the SQLCA.SQLCODE and SQLCA.SQLERRD[1] values; there are ways of getting information about them (such as finderr). There isn't any standard way of getting the meaning of the SQLSTATE values, which makes them much less helpful for error processing. -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h>