Re: connecting problem, SQL*net v.1, Pro*C

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Fri, 18 May 2001 15:57:26 -0400
Message-ID: <bjvagtcq001stir57c9in4ah4atjtc9376_at_4ax.com>


A copy of this was sent to "Aca Vasic" <acko_at_ni.ac.yu> (if that email address didn't require changing) On Thu, 17 May 2001 14:19:51 +0200, you wrote:

>Hi everobody,
>I'm experiencing problem in connecting to oracle database v7.2 from my cgi
>program written in Pro*C.
>The cgi program should connect to database using SQL*net v.1
>The program compile succesfully, but when it is started, I got a message,
>something like this:
>"host definition doesn't exist"
>I can connect using SQL*plus, for example, using the same username/password
>and connect string so I don't think the problem is in SQL*net
>administration.
>So can anybody help me?
>Thanks in advance...
>

cgi-bins run in a clean environment. Your ORACLE_HOME, ORACLE_SID, LD_LIBRARY_PATH PATH and so on are not set at all.

You need to setup a shell script that is really run by the webserver -- this shell script will run your C code AFTER setting the ORACLE_HOME, PATH, LD_LIBRARY_PATH and so on.

For now, to test, set up a shell script that is:

#!/bin/sh

/bin/echo Content-Type: text/plain
/bin/echo
printenv

put that script in your cgi-bin directory and run it from the web to see what "missing" in your environment.

>
>
>

--
Thomas Kyte (tkyte_at_us.oracle.com) Oracle Service Industries
Howtos and such: http://asktom.oracle.com/
Oracle Magazine: http://www.oracle.com/oramag
Opinions are mine and do not necessarily reflect those of Oracle Corp 
Received on Fri May 18 2001 - 21:57:26 CEST

Original text of this message