Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Help using Pro*C as CGI

Re: Help using Pro*C as CGI

From: John Strange <jstrange_at_imtn.dsccc.com>
Date: 1997/08/12
Message-ID: <5spjgl$352@camelot.dsccc.com>#1/1

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)
  ecm_crash (FATAL_ERR, app_name, "putenv alloc returned null for", mptr, sub_ptr);

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US