Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help using Pro*C as CGI
Set your environment variables from inside the pro c code.
You could read the variables from a configuration file.
You want to malloc the space and do not release it until
you exit the program.
Hard code example:
str_len = sprintf (temp, "ORACLE_HOME=where_ever") ;
mptr = malloc (str_len + 1) ; /* allocate variable space */
if (mptr == NULL)
ecm_crash (FATAL_ERR, app_name, "malloc returned null for", temp, sub_ptr);
lint_ptr = strcpy (mptr, temp) ;
i = putenv (mptr) ; /* set the variable */if (i != 0)
wjakahi_at_mail.techpark.sunysb.edu wrote:
: I'm writing a program to retrieve data from the database using Pro*C.
: Everything works fine under my account, but when I try to run it from
: the webserver account, I am unable to login.
: I'm pretty sure the account needs to know where ORACLE_HOME is. How
: can I set this. I'm told the webserver account has no access to
: profile.
: tia,
: Wade
-- This posting represents the personal opinions of the author. It is not the official opinion or policy of the author's employer. Warranty expired when you opened this article and I will not be responsible for its contents or use.Received on Tue Aug 12 1997 - 00:00:00 CDT
![]() |
![]() |