Avatar of sehgaln
sehgaln
 asked on

Database Connection from Perl

I am using DBI, DBD:Oracle to connect to database through a perl script in cgi directory from Apache.
I am getting following error while I run the .cgi script...

[Thu Mar 20 17:07:55 2003] [error] [client 140.176.34.111] DBI connect('host=hostname;sid=orcl;port=1521','user','passwod') failed:  at C:/Program Files/Apache Group/Apache2/cgi-bin/test_db2_new.pl line 20
[Thu Mar 20 17:07:55 2003] [error] [client 140.176.34.111] Error:

I am using Apache web server 1.2 running on windows 2000 and my database is on HPUX.
Programming

Avatar of undefined
Last Comment
adg080898

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Itatsumaki

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
adg080898

Try this:

my(@aDBILogin) = (
     'DBI:Oracle:__THEDATABASE__;host=__THEHOST__',
     '__THEUSERNAME__',
     '__THEPASSWORD__'
);

my($dbh);

$dbh = DBI->connect(@aDBILogin);
$dbh->{RaiseError} = 1;

SOLUTION
adg080898

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
CleanupPing

sehgaln:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
adg080898

He got two responses, one on the same day and one the day after. It's been 6 months with no response.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy