I sent this to the DBI list, but didn't get any help. I'm not so sure it's
a DBI problem, so I'm sending it here to see if perhaps someone here may be
able to help me. I cannot get a script to run from a browser. I've added
the ORACLE_HOME environment variable to the script, which is usually the
culprit in this type of scenario, but it doesn't seem to help. With it or
without it, the message is the same. The error message is:
"Can't connect .... ORA-12640: Authentication adapter initialization failed
(DBD: login failed)."
This script does run just fine from the command line but will not run from
the browser. I'm thinking it's some other environment issue but cannot
figure out what is missing.
Win 2k
Oracle 8.1.7
Apache 1.3.27
Perl 5.6.1
DBI 1.28
DBD::Oracle 1.06
Code snippet:
#!d:\perl\bin\perl.exe -w
use strict;
use DBI;
use DBD::Oracle;
$ENV{'ORACLE_HOME'} = '\\\\machine\d$\oracle\ora81';
$ENV{'ORACLE_SID'}='bar';
my $data_source = "DBI:Oracle:host=foo;sid=bar";
DBI->trace(2);
my $dbh = DBI->connect($data_source,"user","password")
or die "Can't connect to $data_source: $DBI::errstr\n";
......
Parts of the trace file:
DBI 1.28-nothread dispatch trace level set to 2
-> DBI->connect(DBI:Oracle:host=*;sid=*, *, *)
-> DBI->install_driver(Oracle) for MSWin32 perl=5.006001 pid=1660
ruid=0 euid=0
install_driver: DBD::Oracle version 1.06 loaded from
d:/Perl/site/lib/DBD/Oracle.pm
<- install_driver= DBI::dr=HASH(0x1aa73e8)
-> connect for DBD::Oracle::dr (DBI::dr=HASH(0x1aa73e8)~0x19fc6c4
'host=*;sid=*' '*' * HASH(0x1acf360))
connect using
'(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(HOST=*)(PROTOCOL=tcp)(PORT=1526))(ADDRESS=(HOST=*)(PROTOCOL=tcp)(PORT=1521)))(CONNECT_DATA=(SID=*)))'1
-> debug in DBD::_::common for DBD::Oracle::dr (DBI::dr=HASH(0x19fc6c4)~INNER)
1 <- debug= 2 at Oracle.pm line 90
Trying to fetch ORACLE_HOME and ORACLE_SID from the registry.
Found @ D:\oracle\ora81.
Loading D:\oracle\ora81/network/admin/tnsnames.ora
Found T2.
Found INST1_HTTP.
!! ERROR: 12640 'ORA-12640: Authentication adapter initialization
failed (DBD: login failed)'
<- connect= undef at DBI.pm line 490
-> errstr in DBD::_::common for DBD::Oracle::dr
(DBI::dr=HASH(0x1aa73e8)~0x19fc6c4)
<- errstr= 'ORA-12640: Authentication adapter initialization failed
(DBD: login failed)' at DBI.pm line 491
DBI->connect(host=*;sid=*) failed: ORA-12640: Authentication
adapter initialization failed (DBD: login failed)
-> $DBI::errstr (&) FETCH from lasth=DBI::dr=HASH(0x19fc6c4)
>> DBD::Oracle::dr::errstr
-> DESTROY for DBD::Oracle::db (DBI::db=HASH(0x19fc688)~INNER)
DESTROY for DBI::db=HASH(0x19fc688) ignored - handle not initialised
<- DESTROY= undef at appeals.pl line 62
-- DBI::END
.......
Any suggestions?
-Mike
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
- Re: CGI environment issues Michael Ragsdale
- Re: CGI environment issues Wiggins d'Anconia
- Re: CGI environment issues Michael Ragsdale