You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Geoffrey Young <gy...@laserlink.net> on 2000/07/26 14:27:06 UTC
DBD-Oracle and mod_perl
hi everyone...
I was just wondering if anyone has been able to get the newer releases of
DBD-Oracle to work under mod_perl?
that is, using DBD-Oracle 1.04, 1.05, and 1.06, under perl 5.005 (RH6.0
standard) and DBI-1.14 I get consistently non-working results, but only when
running under mod_perl. If I revert to 1.03, all is fine again...
I was getting these errors before the conference, but wanted to investigate
further. Yesterday I rolled my own perl 5.6 ( with -Dusethreads) and
rebuilt everything, mod_perl, DBI, DBD::Oracle, etc. Still the same
results...
basically, I get the following errors on a simple connect and 'select
sysdate from dual':
use DBD::Oracle;
# results in:
# Can't load
'/usr/local/lib/perl5/site_perl/5.6.0/i686-linux-thread-multi/auto/DBD/Oracl
e/Oracle.so' for module DBD::Oracle: libclntsh.so.1.0: cannot open shared
object file: No such file or directory at
/usr/local/lib/perl5/5.6.0/i686-linux-thread-multi/DynaLoader.pm line 200.
at /usr/local/apache/perl-bin/dbtest.pl line 9
letting DBI load DBD::Oracle itself, my trace looks like this:
DBI 1.14-nothread dispatch trace level set to 6
-> DBI->connect(dbi:Oracle:HELM, www, ****, HASH(0x86e040c))
-> DBI->install_driver(Oracle) for perl=5.006 pid=3393 ruid=99 euid=99
and that's all, but the script manages to release control of the phase,
because I use a cleanup handler to log to (a different) database, which then
gets:
-> DBI->connect(dbi:Oracle:PORTAL, porter, ****, HASH(0x8480178))
-> DBI->install_driver(Oracle) for perl=5.006 pid=3393 ruid=99 euid=99
install_driver: DBD::Oracle loaded (version 1.06)
Use of inherited AUTOLOAD for non-method DBD::Oracle::ORA_OCI() is
deprecated at
/usr/local/lib/perl5/site_perl/5.6.0/i686-linux-thread-multi/DBD/Oracle.pm
line 48.
Use of uninitialized value.
of course, the same script running from shell runs just fine (with the three
mod_perl related lines removed, of course), both use()ing DBD::Oracle and
without.
anyway, it's probably just me. I don't have a problem with DBD::Oracle 1.03
so it's no biggie but I wanted to point it out, just in case...
--Geoff
Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
Platform:
osname=linux, osvers=2.2.14-5.0, archname=i686-linux-thread-multi
uname='linux spinnaker.laserlink.net 2.2.14-5.0 #1 tue mar 7 21:07:39
est 2000 i686 unknown '
config_args='-Dcc=gcc -Dusethreads -des'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
useperlio=undef d_sfio=undef uselargefiles=define
use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
Compiler:
cc='gcc', optimize='-O2', gccversion=egcs-2.91.66 19990314/Linux
(egcs-1.1.2 release)
cppflags='-D_REENTRANT -fno-strict-aliasing'
ccflags ='-D_REENTRANT -fno-strict-aliasing -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64'
stdchar='char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=4, usemymalloc=n, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lpthread -lc -lposix -lcrypt
libc=/lib/libc-2.1.3.so, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES
PERL_IMPLICIT_CONTEXT
Built under linux
Compiled at Jul 25 2000 19:47:55
@INC:
/usr/local/lib/perl5/5.6.0/i686-linux-thread-multi
/usr/local/lib/perl5/5.6.0
/usr/local/lib/perl5/site_perl/5.6.0/i686-linux-thread-multi
/usr/local/lib/perl5/site_perl/5.6.0
/usr/local/lib/perl5/site_perl
.
Re: DBD-Oracle and mod_perl
Posted by Tim Bunce <Ti...@ig.co.uk>.
On Wed, Jul 26, 2000 at 01:54:51PM +0100, Tommy Wareing wrote:
>
> On Wed, Jul 26, 2000 at 08:27:06AM -0400, Geoffrey Young wrote:
> >
> > hi everyone...
> >
> > I was just wondering if anyone has been able to get the newer releases of
> > DBD-Oracle to work under mod_perl?
> >
> > that is, using DBD-Oracle 1.04, 1.05, and 1.06, under perl 5.005 (RH6.0
> > standard) and DBI-1.14 I get consistently non-working results, but only when
> > running under mod_perl. If I revert to 1.03, all is fine again...
>
> Tim's changed the Makefile.PL to include
> $::opt_b = 1; # try to use Oracle's own 'build' rule
> (it used to default to 0).
>
> Unfortunately, this has the side effect of requiring you to set
> LD_LIBRARY_PATH to load the libararies, and to my knowledge (not very
> much knowledge), there's no way to actually set this value back to 0,
> other than editing the script.
The real problem is that for some reason the generated Makefile no
longer has a -R$ORACLE_HOME/lib option on the linker command line.
(Which means that the built shared object doesn't 'remember' where
to find the library at runtime.)
I've not had time to investigate why 'Makefile.PL -b' has that effect.
I'd welcome anyone else looking into it.
Tim.
Re: DBD-Oracle and mod_perl
Posted by "Michael A. Chase" <mc...@ix.netcom.com>.
----- Original Message -----
From: "Tommy Wareing" <p0...@brookes.ac.uk>
To: "Geoffrey Young" <gy...@laserlink.net>
Cc: <mo...@apache.org>; <db...@isc.org>
Sent: Wednesday, July 26, 2000 5:54 AM
Subject: Re: DBD-Oracle and mod_perl
> Tim's changed the Makefile.PL to include
> $::opt_b = 1; # try to use Oracle's own 'build' rule
> (it used to default to 0).
>
> Unfortunately, this has the side effect of requiring you to set
> LD_LIBRARY_PATH to load the libararies, and to my knowledge (not very
> much knowledge), there's no way to actually set this value back to 0,
> other than editing the script.
The '-nob' option to Makefile.PL should do that. If it doesn't, we have
more to fix than just LD_LIBRARY_PATH.
Re: DBD-Oracle and mod_perl
Posted by Tommy Wareing <p0...@brookes.ac.uk>.
On Wed, Jul 26, 2000 at 08:27:06AM -0400, Geoffrey Young wrote:
>
> hi everyone...
>
> I was just wondering if anyone has been able to get the newer releases of
> DBD-Oracle to work under mod_perl?
>
> that is, using DBD-Oracle 1.04, 1.05, and 1.06, under perl 5.005 (RH6.0
> standard) and DBI-1.14 I get consistently non-working results, but only when
> running under mod_perl. If I revert to 1.03, all is fine again...
Tim's changed the Makefile.PL to include
$::opt_b = 1; # try to use Oracle's own 'build' rule
(it used to default to 0).
Unfortunately, this has the side effect of requiring you to set
LD_LIBRARY_PATH to load the libararies, and to my knowledge (not very
much knowledge), there's no way to actually set this value back to 0,
other than editing the script.
So, either
a) edit the script, don't use Oracle's build rule, and don't set
LD_LIBRARY_PATH, or
b) use Oracle's build rule, and do set LD_LIBRARY_PATH.
I presume there ought to be a downside to option a?
--
Tommy Wareing
This .sig space available for rent.
Apply within.