[ale] Any DBI Oracle guys out there?

Armsby John-G16665 John.Armsby at motorola.com
Tue Jan 18 16:50:00 EST 2005


Thanks for the input.  I have set the oracle home environment in both the /etc/profile and the perl script.  I am going to share your input with our oracle DBA and see what happens.

Thanks for taking the time to answer the post.

John


-----Original Message-----
From: ale-bounces at ale.org [mailto:ale-bounces at ale.org] On Behalf Of David Muse
Sent: Tuesday, January 18, 2005 1:45 PM
To: Atlanta Linux Enthusiasts
Subject: Re: [ale] Any DBI Oracle guys out there?


Now that I think about it, there are some other potentially complicating factors...

Getting $ORACLE_HOME/lib into the LD_LIBRARY_PATH is part of the challenge, but there are a host of environment variables that should be set for any process using oracle.  It might be good to create a file with just those environment variable settings in them and source it from/etc/profile(or /etc/bashrc) and from apache's startup script.

Some platforms have an /etc/profile.d directory and any script in it will be sourced when a user logs in.

So, maybe you could create /etc/profile.d/oracle containing:

export ORACLE_VERSION=10.1.0
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/$ORACLE_VERSION
export ORACLE_SID=ora1
export PATH=$PATH:$ORACLE_HOME/bin
export CLASSPATH=$ORACLE_BASE/jdbc/lib/classes111.zip
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export ORACLE_OWNER=oracle
export ORACLE_TERM=386
export NLS_LANG=american

And then, near the top of the apache startup script:

. /etc/profile.d/oracle

Dave

On Tue, 18 Jan 2005 12:04:39 -0500
Armsby John-G16665 <John.Armsby at motorola.com> wrote:

> I have a little test script which runs from the shell "perl 
> testOracleObject.pl"  It uses DBI successfully and prints a few 
> records
to the screen. No warnings, works great.
>  
> I take the same script, add a little html stuff... and run it directly 
> as a url from cgi-bin
> 
> print"content-type: text/html\n\n";
> print("<html><body>");
>  
> http://ga25web04.wepd.mot.com/cgi-bin/testOracleObject.pl
> <http://ga25web04.wepd.mot.com/cgi-bin/testOracleObject.pl>
>  
> and APACHE 2.0.46 blows up.
>  
> Any ideas??  I am stumped.  Next thing to do is post to perl guys.....
>  
> John
>  
>  
>  
> [Tue Jan 18 11:41:44 2005] [error] [client 155.102.104.81]
> install_driver(Oracle) failed: Can't load 
> '/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/DBD/Orac
> le/Oracle.so' for module DBD::Oracle: libclntsh.so.9.0: cannot open 
> shared object file: No such file or directory at 
> /usr/lib/perl5/5.8.0/i386-linux-thread-multi/DynaLoader.pm line 
> 229.[Tue Jan 18 11:41:44 2005] [error] [client 155.102.104.81]  at 
> (eval 1) line 3[Tue Jan 18 11:41:44 2005] [error] [client 
> 155.102.104.81] Compilation failed in require at (eval 1) line 3.[Tue 
> Jan 18 11:41:44 2005] [error] [client 155.102.104.81] Perhaps a 
> required shared library or dll isn't installed where expected[Tue Jan 
> 18 11:41:44 2005] [error] [client 155.102.104.81]  at 
> oracleConnectionObject.pm line 54
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale



More information about the Ale mailing list