Re: Problems with dbi:Oracle

Bruce Johnson <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.general
Message-ID <[email protected]>
On Jan 21, 2013, at 3:08 PM, Alexander Foken <[email protected]> wrote:

> You seem to run from a CGI environment. Look at the http server error log for details of the error.
> 
> Note that Oracle may depend on some environment variables that are NOT available by default when running in the context of the http server.
> 
> Try to debug with a simple command line script instead of a CGI first, then blame DBI or DBD::Oracle.


What Alexander said.

Any script that uses Oracle via DBI must have at least the $ORACLE_HOME and $LD_LIBRARY_PATH environment vars available.

In Apache you can pass specified environment vars from the user who starts the Apache httpd processes in a directive, SetEnv:

#PassEnv PATH
SetEnv LD_LIBRARY_PATH /usr/lib/oracle/11.2/client64/lib
SetEnv ORACLE_HOME /usr/lib/oracle/11.2/client64

This is for linux-based Oracle Instant Client.

-- 
Bruce Johnson
University of Arizona
College of Pharmacy
Information Technology Group

Institutions do not have opinions, merely customs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.