Re: Oraperl, Oracle env varaiables & the Web

From: Jim Dowson <jdowson_at_elegant.com>
Date: Wed, 1 Mar 1995 20:24:35 GMT
Message-ID: <D4s3Cz.D0M_at_elegant.com>


In article <3ivku2$j4f_at_lastactionhero.rs.itd.umich.edu> skumar_at_ciesin.org (Suresh Kumar) writes:
>
> Hi all,
>
> I am using oraperl to query my oracle database from
> a www client. My cgi-bin script has the following lines...
>
> print "before oralogin";
>
> $lda = &ora_login('XXXXX', 'YYYYY', 'ZZZZZ');
>
> print "after oralogin";
>
> The lines after the ora_login are not executed, probably because
> I dont have a session to continue. Do I have to set any oracle environment
> variable? If so what and how? Any help in this regard would be
> highly appreciated.

The only environment variable that you _have_ to set is ORACLE_HOME. It's a good idea to do:

    die "$0 is not running under oraperl\n" unless defined &ora_login;

    $lda = &ora_login($SID, $user, $user_passwd)

        || die "$0 login got $ora_errstr";

If you need to, you could do this to set ORACLE_HOME (before login):

    $ENV{'ORACLE_HOME'} = '/opt/oracle/product/...';

-- 
Jim Dowson                              email:  jdowson_at_Elegant.COM
Elegant Communications Inc.             Voice:  +1 416 362-9772
4 King Street West, Suite 1101          Fax:    +1 416 362-8324
Toronto, ON                             Pager:  +1 800 946-4645 PIN 1090922
Received on Wed Mar 01 1995 - 21:24:35 CET

Original text of this message