[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Perl modules and Oracle 10g on RHEL 4



On Mon, 2005-02-28 at 21:33 +0100, nodata wrote:
> On Mon, 2005-02-28 at 10:19 -0500, Michael Griffin wrote:
> > On Sun, 2005-02-27 at 14:20 +0100, nodata wrote:
> > > On Fri, 2005-02-25 at 13:17 -0500, Michael Griffin wrote:
> > > > On Fri, 2005-02-25 at 19:01 +0100, nodata wrote:
> > > > > On Fri, 2005-02-25 at 09:57 -0500, Michael Griffin wrote:
> > > > > > Does anyone have a procedure for installing supplemental Perl modules
> > > > > > into the Oracle 10g Perl installation? I am using RHEL 4 with 10g
> > > > > > (latest). I have tried setting the PERL5LIB environment variable to
> > > > > > point to the $ORACLE_HOME/perl/{5.6.* and site_perl} directory and using
> > > > > > the perl executable in the perl/bin directory, but I get wierd @INC
> > > > > > errors when I run scripts after installing modules.
> > > > > > 
> > > > > > I guess I need a starting point to get the environment set up correctly.
> > > > > > 
> > > > > > The goal is to install modules like Spreadsheet::WriteExcel so that I
> > > > > > can run my report scripts.
> > > > > > 
> > > > > > All help is appreciated.
> > > > > > 
> > > > > > Michael
> > > > > > 
> > > > > > --
> > > > > > nahant-list mailing list
> > > > > > nahant-list redhat com
> > > > > > http://www.redhat.com/mailman/listinfo/nahant-list
> > > > > > 
> > > > > > 
> > > > > 
> > > > > I don't understand your question, so the reply won't be good, but here
> > > > > goes:
> > > > > 
> > > > > I've never had a problem using
> > > > >  perl -eshell -MCPAN
> > > > > 
> > > > > nd
> > > > > 
> > > > Forgive me, I have tried using that (perl -MCPAN -e shell) as well as
> > > > using /opt/oracle/product/10g/perl/bin/perl -MCPAN -e shell.  I guess
> > > > the problem is in my scripts maybe.  Should I change my scripts to start
> > > > with #!/opt/oracle/product/10g/perl/bin/perl?  Should I set the PERL5LIB
> > > > variable?  I will elaborate more if necessary, I just didn't want to get
> > > > too verbose.
> > > > 
> > > > Michael
> > > 
> > > So Oracle installs its own Perl? That's strange (are they allowed to do
> > > that?)
> > > 
> > > I'm assuming that Oracle bundles its own perl for a good reason, so for
> > > Oracle apps, I suppose you should use that.
> > > 
> > > Run perl -V with each version, and check the INC array. This will tell
> > > you where perl will be looking for modules.
> > > 
> > 
> > Okay, I am not getting where I want to go.  Here is my testing
> > environment:
> > 
> > RHEL 4 ES
> > Oracle 10g
> > Apache 2.0.52
> > Perl 5.8.5
> > 
> > On my RHEL 3 - Oracle 9i environment I am running Apache 2.0.46 and Perl
> > 5.8.0.
> > 
> > I run intranet web pages that automatically generate against queries to
> > the database using the DBI Perl module to connect and the DBD::Oracle
> > module to perform the query.
> > 
> > The problem is that a Perl script with a use DBD::Oracle directive works
> > perfectly well from the command line (this script generates a web page
> > and upon CLI execution, produces the expected HTML code and query
> > results), however, when opening the page in a browser, apache pukes up
> > about not being able to find the perl shared library: 
> > 
> > /var/log/httpd/error_log:
> > ...
> > Can't load '/usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-
> > multi/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle
> > libclntsh.so.10.1: cannot open shared object file: no such file or
> > directory at /lib64/perl5.8.5/x86_64-linux-thread-multi/DynaLoader.pm
> > line 230.
> > ...
> > 
> > I guess the question is, does this sound like an Oracle problem?  An
> > Apache problem?  I don't want to continue barking up the wrong tree.
> > 
> > I have tried setting the PERL5LIB environment variable.  The DBI and
> > DBD::Oracle modules are installed in both the standard perl install
> > directory as well as in the $ORACLE_HOME/perl directory.  I have set the
> > variable to both and the script still spits out the apache error.
> > 
> > Thank you for the responses so far,
> > 
> > Michael
> 
> You have two Perl's, Apache is calling the wrong one.
> 
> You could try amending INC to include /usr/lib64/perl5/site_perl/5.8.5/.
> 
> >From perlfaq:
>       How do I add a directory to my include path (@INC) at runtime?
> 
>        Here are the suggested ways of modifying your include path:
> 
>            the PERLLIB environment variable
>            the PERL5LIB environment variable
>            the perl -Idir command line flag
>            the use lib pragma, as in
>                use lib "$ENV{HOME}/myown_perllib";
> 
> 
After much searching and adding the above with my environment, I came
across the SetEnv parameter in httpd.conf.  I set it with 

SetEnv LD_Library_PATH $ORACLE_HOME/lib

and now the world is OK again.

Thanks for the help.

Michael


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]