Re: Oracle ProC CGI problem

From: Andy Finkenstadt <kahuna_at_panix.com>
Date: 1997/03/10
Message-ID: <5g17u5$sar_at_panix3.panix.com>#1/1


In <3317856C.11F9_at_eecs.tulane.edu> Mike Rosso <mike_at_eecs.tulane.edu> writes:
>I just wrote a CGI program by using Oracle ProC program. The CGI
>program will connect to the Oracle database(the usrid/passwd is hard
>coded in), get some data and print them out to the web browser. The CGI
>program runs perfect when running alone on webserver's cgi-bin
>directory. It does connect to the database and print out the result along
>with html tags.

Great! That's a good first step.

>The problem happenes when the CGI program is called from a web browser
>(netscape in this case). It just cannot connect to the Oracle database. The
>program stops right at the place where it tries to connect. The returned
>message says:
>ORA-02700: Unable to open message file (SQL-02113). in "..." on line 0
> of .
>The message is about "error creating archive log". I checked the Oracle
>server setting, the arvhive log option is turned off.

This is actually misleading. The true error is probably that ORACLE_HOME and ORACLE_SID are not set when running your CGI program from the web environment.

Since you've hard coded your username and password entries, you probably won't mind hard coding in the values of Oracle environment variables, either.

  main()
  {
    putenv("ORACLE_HOME=/u01/oracle/app/oracle/product/7.3.2");     putenv("ORACLE_SID=orac");
    EXEC SQL CONNECT....;
  }  

-- 
Andrew Finkenstadt (ICQ UIN 221059 "kahuna")
see web page for affiliations: http://www.supernet.net/~kahuna/
Received on Mon Mar 10 1997 - 00:00:00 CET

Original text of this message