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: ORACLE AND CGI SCRIPT

Re: ORACLE AND CGI SCRIPT

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Thu, 06 May 1999 16:58:15 GMT
Message-ID: <3734c9ee.11528567@192.86.155.100>


A copy of this was sent to PELOUX Olivier <opeloux_at_ifhamy.insa-lyon.fr> (if that email address didn't require changing) On Thu, 06 May 1999 17:46:16 +0200, you wrote:

>I have wriiten a CGI script in c which has to connect to an Oracle
>Server.
>When I execute this script by a telnet on the server the script works
>but when I execute this script with netscape or Explorer navigator the
>script doesn't connect to the Oracle server and there is the error
>ORA-1012.
>Please if someone could give me a solution that should be great!!
>Thank you

cgi bins typically run in a clean environment. you've lost your oracle_home and oracle_sid.

write a small sh script like:

#!/bin/csh
setenv ORACLE_HOME /....
setenv ORACLE_SID .....

exec ./your_cgi_bin_program

and call that from the web instead.

See http://www.oracle.com/ideveloper/ for my column 'Digging-in to Oracle8i'...  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA

--
Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Thu May 06 1999 - 11:58:15 CDT

Original text of this message

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