At 4:09 PM +0100 2/8/02, [EMAIL PROTECTED] wrote: >Hi all, >i have just installed DBI-1.20, ApacheDBI-0.88 and DBD-Oracle-1.12 on a >tru64 Unix 5.1a. Also installed is Oracle 8.1.7 with Oracle supplied Apache >1.3.12 and Oracle supplied perl 5.005_03. >After some problems i got it work together with DBD::Oracle. The problem now >is as follows: >I run the following script (just select the dbname and hostname from a >function, commented out host user and password) > >#!/usr/bin/perl >##### Perl script start ###### >$ENV{'ORACLE_HOME'}="/u01/app/oracle/product/8.1.7"; >use DBI; >print "Content-type: text/plain\n\n";
Try the following instead... eval { $dbh = DBI->connect(DSN,USERNAME,PASSWORD) || die $DBI::errstr; }; if($@) { print "DB Connect error: $@"; exit; } eval { $sth = $dbh->prepare("select fc_get_dbname from dual"); $sth->execute; ($dbname) = $sth->fetchrow_array; $sth->finish; }; if($@) { print "DB Select failure: $@"); $dbh->disconnect if(defined $dbh); exit; } print $dbname."\n"; $dbh->disconnect if(defined $dbh); Rob >$dbh = DBI->connect("dbi:Oracle:host=host;SID=sid", "usr", "pwd") || die >$DBI::errstr; >$stmt = $dbh->prepare("select fc_get_dbname from dual")|| die $DBI::errstr; >$rc = $stmt->execute() || die $DBI::errstr; >while (($dbname) = $stmt->fetchrow()) { print "$dbname\n"; } >warn $DBI::errstr if $DBI::err; >die "fetch error: " . $DBI::errstr if $DBI::err; >$stmt->finish() || die "can't close cursor"; >$dbh->disconnect() || die "cant't log off Oracle"; >##### Perl script End ###### > >which puts the following message: > >abba02.orgdv> perl test4.pl >Content-type: text/plain > >DB: ENTWICKL auf Maschine: abbaentwickel.orgdv >DBI handle cleared whilst still active during global destruction. >DBI Handle has 1 uncleared child handles during global destruction. > dbih_clearcom (h 0x14012c8f0, com 0x140043880): > FLAGS 0x211: COMSET Warn AutoCommit > TYPE 1 > PARENT undef > KIDS 1 (0 active) > IMP_DATA undef in 'DBD::Oracle::dr' > thread cond var 0x140130f30, tid 65535 > >if i run an application in Apache and call a cgi script it puts the same >message in the error_log from apache. >did i forget something or is it a bug which should be posted as described in >the manuals? > >MfG >Volker Winter >plan business AG >NDR Projekt ABBA >email: [EMAIL PROTECTED] -- When I used a Mac, they laughed because I had no command prompt. When I used Linux, they laughed because I had no GUI.