Link to home
Start Free TrialLog in
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.
ASKER CERTIFIED SOLUTION
Avatar of Itatsumaki
Itatsumaki

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of adg080898
adg080898

Try this:

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

my($dbh);

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

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
He got two responses, one on the same day and one the day after. It's been 6 months with no response.