Re: Fast-CGI with Informix

Bruce R. Lewis (brlewis@MIT.EDU)
02 May 1997 09:38:12 -0400

To: fastcgi-developers@OpenMarket.com
Subject: Re: Fast-CGI with Informix
From: brlewis@MIT.EDU (Bruce R. Lewis)
Date: 02 May 1997 09:38:12 -0400
In-Reply-To: Zoran Vasiljevic's message of Fri, 2 May 1997 09:40:37 +0000
Message-Id: <nm93es6yoxn.fsf@kindness.MIT.EDU>

Zoran Vasiljevic <zoran@v-connect.com> writes:

> We have been using it extensively with OnLine 7.x with no problems
> whatsoever. Did you check all of those environment variables
> (INFORMIXSERVER, INFORMIXDIR,...). Error -461 seems as you dont get a
> connection to the dbserver (although error description says something
> wierd about transferring TEXT to BLOB column values...).
> Also remember that FastCGI uses two environments (one initial and one
> per-request). Be sure that both of them have these Informix env
> variables defined.

I'm using FastCGI with Oracle and had a similar problem.  I think
putting extra environment variables in the per-request environment
complicates things too much; a better solution is to avoid scattering
the database code among the CGI code, and do this when calling the
database code:

#ifdef HAVE_LIBFCGI
  environ_fcgi = environ;
  environ = environ_initial;	/* prevents FCGI from bashing OCI env vars */
#endif
  brl_oci_dosql();
#ifdef HAVE_LIBFCGI
  environ = environ_fcgi;
#endif
  return;


-- 
b(l)char *l;{write(1,"\r",1);write(1,l,strlen(l));sleep(1);}main(){b("Bruce ");
b("Lewis "); b("Analyst "); b("Programmer "); b("MIT Information Systems ");
b("<URL:http://web.mit.edu/brlewis/www/>\n");exit(0);}