Re: web databases & CGI
Posted in 1999
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Server Administration
Jonathan Thanks, I forgot about LD_LIBRARY_PATH. Sujit Jonathan Leffler <jleffler@earthlink.net> on 11/16/99 12:50:32 AM Please respond to Jonathan Leffler <jleffler@earthlink.net> To: informix-list@iiug.org cc: (bcc: Sujit Pal) Subject: Re: web databases & CGI Its an odds-on bet that environment is the problem. You might need to add LD_LIBRARY_PATH to the list of variables Sujit suggests, unless you are using statically linked programs or have $INFORMIXDIR=/usr/lib. In my experience, ONCONFIG is not important with current servers; the others are. Also, there is a PassEnv directive in Apache; however, you should concentrate on SetEnv. Sujit.Pal@bankofamerica.com wrote: > Whats the problem? One common problem is that your program is not able to find > the database - you need to set the PATH, INFORMIXDIR, INFORMIXSERVER and > ONCONFIG variables, either in a script that will call your CGI program or using > the configuration variable SetEnv (in Apache). > > Kalveer Heer <kal.heer@virgin.net> on 11/15/99 10:12:24 AM > > I'm trying to connect to an Informix Databse over the web using CGI scripts > programmed in ESQL? > > Has anyone had any experience in doing so? > > I'm running the application on an UNIX environment. -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.62 -- see http://www.perl.com/CPAN #include <disclaimer.h>
I've included some sql error checks and when the cgi program is executed i get an sqlerror in my logfile: Testing CGI program ===================== Run at: 10:21:33 on 17/11/1999 opening database ksh_db@informix connecting to db sqlcode -461, isam 0 Sql: Unable to load locale categories. i've checked the error...and am a bit dazzled? ------------------------------------------------ Signing OUT! Email: mailto:ksh@cs.bham.ac.uk WWW:http://www.heer.org.uk
Environment, environment, environment. When something goes wrong with a CGI program and Informix, it is almost invariably environment. Web servers do not export all the environment they inherit when they are run. You have to tell them to export key variables like INFORMIXDIR (your immediate problem) and INFORMIXSERVER (your next problem). In Apache, the SetEnv directive. In Netscape, something else... Kalveer S Heer wrote: > I've included some sql error checks and when the cgi program is executed > i get an sqlerror in my logfile: > > Testing CGI program > ===================== > > Run at: 10:21:33 on 17/11/1999 > > opening database > ksh_db@informix > connecting to db > > sqlcode -461, isam 0 > Sql: Unable to load locale categories. > > i've checked the error...and am a bit dazzled? > > ------------------------------------------------ > Signing OUT! > > Email: mailto:ksh@cs.bham.ac.uk > WWW:http://www.heer.org.uk -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.62 -- see http://www.perl.com/CPAN #include <disclaimer.h>