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: cgi gateway to oracle database

Re: cgi gateway to oracle database

From: Jeff Kalchik <jeff_kalchik_at_spam-me-not.mw.3com.com>
Date: Tue, 20 Apr 1999 15:49:27 GMT
Message-ID: <371ca1c8.6675307@news.usr.com>


On Mon, 19 Apr 1999 22:11:15 GMT, hchen42j15_at_my-dejanews.com wrote:

>I had following problem when I tried to use DBI/DBD (DBI version 1.06, DBD
>version 0.60) to connect to Oracle database (version 7.3.4). The following
>script runs ok under Unix environment but fails when accessing through Web. It
>seems that the ora_login function fails. I appreciate if anyone can help
>me out.
>
>H. Chen
>
>-----------------------------
>#!/opt/pub/exptools/bin/perl
>
>use Oraperl;
>
>print "Content-type: text/plain", "\n\n";
>
>$lda = &ora_login ($system_id, "scott", "tiger");
># $system_id is the connecting string for the database
>
>$csr = &ora_open ($lda, " select sysdate from dual ");
>($sdate) = &ora_fetch ($csr);
>&ora_close ($csr);
>&ora_logoff ($lda);
>print "today is $sdate", "\n";

Check to make sure that ORACLE_HOME is available in your CGI environment, and that $ORACLE_HOME/bin is on the path.

Hint: If you're using Apache, look up PassEnv in the configuration.



Jeff Kalchik
Views expressed are my own, not my employers. Received on Tue Apr 20 1999 - 10:49:27 CDT

Original text of this message

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