problem with DBD::Oracle
- From: Malki.Cymbalista@xxxxxxxxxxxxxx (Malka Cymbalista)
- Date: Wed, 25 May 2005 14:46:45 +0300
Our web server is running Apache 2.0.48 with mod_perl 1.99_12 on a Sun
machine running Solaris 9. We are running perl 5.8.1, DBI 1.39 and
DBD-Oracle 1.16. We are trying to connect from our web server to an
Oracle database that is on a different machine. The script that we
wrote to do this runs perfectly well when we run it from the command
line as a plain user. However, when we try running it from the web, we
cannot connect to the database.
When running from the web, the following environment variables are
printed properly:
TWO_TASK
ORACLE_SID
LIBPATH
LD_LIBRARY_PATH
ORACLE_HOME
SHLIB_PATH
I use the following code to connect to the database:
if ( ! ($dbh = DBI->connect("dbi:Oracle:", $dbuser, '', { PrintError =>
0, AutoCommit => 0 }))) {
print "Error: cannot connect to DB<br>\n";
exit(0);
}
$dbuser is defined as
$dbuser = 'userid/password';
After all the environment variables are printed out, I get the message
Error: cannot connect to DB
As I said at the start, the script works perfectly well from the
command line even when it is run from the same userid that the web runs
under.
Any suggestions to get this working from the web will be greatly
appreciated. Thanks in advance.
Malka Cymbalista
Webmaster, Weizmann Institute of Science
malki.cymbalista@xxxxxxxxxxxxxx
08-934-3036
.
- Follow-Ups:
- Re: problem with DBD::Oracle
- From: Michael A Chase
- Re: problem with DBD::Oracle
- Prev by Date: Re: Reg. perl module installation
- Next by Date: RE: DBI->disconnect is not a DBI method. Read the DBI manual. at ff.pl line 224
- Previous by thread: Reg. perl module installation
- Next by thread: Re: problem with DBD::Oracle
- Index(es):
Relevant Pages
|
|