Environment variables set
Posted in 1997
This may be more of a _UNIX_ question, but I'll post my experience on here since it's related to Informix. I ran into the problem of trying to get Apache web server to talk to Informix via a Perl (DBI/DBD::Informix) CGI program. Well, this wasn't working, because when listing the Env in the script, the ones I set in /etc/profile weren't registered in the script. This is due to the fact that Apache doesn't open a shell for its CGI windows -- instead, just forks a new process when needed (more or less). I tried everything, including hard-coding the ENV vars into the DBD::Informix API in several places. No go. The solution (as odd as it may be) was to patch Apache (thank God for source code!) such that it reads the Informix-specific environment variables -- something I patched into the util_script.c. Does anyone have any other experience in getting web servers to recognize and, perhaps, set these crucial Env variables? Regards, -Tim