Lincoln,
Thanks a bunch for your response. I tried rearranging this like you
said, but it didn't help in my case. However I do appear to have worked
through the problem. Basically, the steps I went through are thusly:
1) Frustrated with the level of debug, I added a DBI->trace_msg call to the
DBI->install_driver() subroutine, just after the call to "require
DBD::Oracle". This resulted in the following message:
Fri May 30 14:18:16 EDT 2003
TEST_DB_CONNECTION: TEST_DB_CONNECTION
DBI 1.32-nothread dispatch trace level set to 9
-> DBI->connect(dbi:Oracle:JDV9, jeffweb, ****)
-> DBI->install_driver(Oracle) for hpux perl=5.008 pid=8458 ruid=104
euid=104
jch: Driver Class=DBD::Oracle err=Can't load
'/opt/perl5/lib/site_perl/5.8.0/PA-RISC2.0-LP64/auto/DBD/Oracle/Oracle.sl'
for module DBD::Oracle: No such file or directory at
/opt/perl5/lib/5.8.0/PA-RISC2.0-LP64/DynaLoader.pm line 229, <STDIN> line 1.
at (eval 4) line 3 Compilation failed in require at (eval 4) line 3, <STDIN>
line 1.
Since I had been explicitly specifying this directory all over the
place, I knew there was some other problem linking.
2) I referenced some docs on the HP website suggesting to use the command
'chatr Oracle.sl' to show the dependencies. I discovered that some of the
dependencies were not in my LD_LIBRARY_PATH or SHLIB_PATH. Adding them to
that path didn't solve the problem either. It appeared bleak after this.
3) I decided to start from scratch with rebuilding perl, after finding more
references on the internet pointing to threaded perl as the problem. I
wanted to ensure I used the proper configure options. I used
'./Configure -A prepend:libswanted='cl pthread
' -Duse64bitall -Uincompat5005 -Duselargefiles -Dprefix=/opt/perl5'. While
going through the prompts, I specified the (a) absolute path to my compiler,
(b) to prepend the +z option to the cc flags when prompted, and (c) included
"-L/usr/lib/pa20_64" in the linker libs at the prompt. This was one of the
places those additional libs specified using 'chatr Oracle.sl' are located.
4) After that, I used the standard incantations as specified in the
excellent http://search.cpan.org/author/TIMB/DBD-Oracle-1.14/README.hpux.
In particular, for the DBD incantations, I found I would error out during
'make' unless I used 'perl Makefile.PL -l', as described in that document.
5) Everything tested successfully from inetd. I still had all my libraries
specified in PERL5LIB, LD_LIBRAQRY_PATH, and SHLIB_PATH in the .profile of
the user running the script from inetd.
Thanks again for your help!
Josh Horton
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, May 29, 2003 15:16
Subject: RE: DBI->connect failing when run from inetd, but not from
commandline hp-ux
> You need to ensure the SHLIB_PATH is correctly set in your environment for
> the oracle lib directory against which you linked. This must be set PRIOR
> to loading DBD::Oracle. You could do it in a BEGIN block in your main
> script. Or you could wrap your script invocation with a shell script that
> does it, prior to running the perl script.
>
> Lincoln
>
> 215-444-7973 (office)
> 267-716-1370 (cellular)
>
>
> -----Original Message-----
> From: Joshua Horton [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 29, 2003 3:00 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: DBI->connect failing when run from inetd, but not from
commandline
> hp-ux
>
> Hi,
>
> This is my first post, but it is definitely a plea for help, as I have
> not found anyone else with this particular issue. I have been using DBI
and
> DBD::Oracle for three years now on four enterprise systems. I have
upgraded
> the system once already successfully, due to the requirement to upgrade
our
> Oracle, and I am now attempting to upgrade a second time to Oracle
> 9.2.0.2.0. The following is my configuration:
>
> Oracle 9.2.0.2.0 Enterprise Edition 64-bit
> HP-UX 11.11, Dec. 2002 Gold patches 2x733, 5GB RAM 64-bit
> perl 5.8.0 custom configured:
>
>
./Configure -Duse64bitall -Ubincompat5005 -Duselargefiles -Dprefix=/opt/perl
> 5 ; all other options default
> DBI-1.32
> DBD::Oracle-1.14
>
> Everything compiles & installs with no problems except for DBD, which I
> already forwarded to Tim Bunce this info, and the error during 'make
test':
>
> : PERL_DL_NONLAZY=1 /opt/perl5/bin/perl "-MExtUtils::Command::MM"
> > "-e" "test_harness(0, 'blib/lib', 'blib/arch')"
> >
>
t/*.tt/base.......okt/cursor.....okt/general....okt/long.......okt/meta.....
> > ..okt/ph_type....ok 11/19 expected 'trailing' but got 'trailing ' for
> > VARCHAR2t/ph_type....FAILED test 12 Failed 1/19 tests, 94.74%
> > okayt/plsql......okt/reauth.....skipped all skipped: no reason
> > givent/select.....okFailed Test Stat Wstat Total Fail Failed List of
> >
>
Failed----------------------------------------------------------------------
> > -------------------------------------------------------t/ph_type.t
> > 19 1 5.26% 121 test skipped.Failed 1/9 test scripts, 88.89% okay.
> > 1/314 subtests failed, 99.68% okay.*** Error exit code 2Stop.
>
> The response to the one other person I found who saw this was, "Install
> Anyway", so I did. The script that has been working correctly for me for
so
> many years, and has always been statically linked. This time I had
trouble
> compiling statically linked perl binaries from DBI and DBD; since so much
> excellent work has been done on the dynamic linking front on HP-UX, I
> decided to go for that.
>
> It all works perfectly, so far as I can tell, when I run my perl server
> script from the command line. However, when I run it from inetd, the
Oracle
> driver fails to install. Setting trace level to 9 returns only the
> following output:
>
> DBI 1.32-nothread dispatch trace level set to 5
>
> -> DBI->connect(dbi:Oracle:JDV9, jeffweb, ****)
>
> -> DBI->install_driver(Oracle) for hpux perl=5.008 pid=517 ruid=104
euid=104
>
> -- DBI::END
>
>
>
> I have tested it with several scripts, all with the same symptom: run them
> from the command line and they're fine. Run them from inetd and they get
> this problem.
>
>
>
> I have tweaked the LD_LIBRARY_PATH six ways from Sunday. I set it in the
> script using $ENV{}, and in the calling user's .profile. Same with
> ORACLE_HOME, ORACLE_SID, ORACLE_BASE, PATH, and PERL5PATH. I have used
"use
> lib" until I was blue in the face. I tried a setting LD_PRELOAD to
preload
> the shared libraries before the other dependents of the program. I have
> ensured all the scripts were set with the appropriate permissions, and
that
> all the DBI/DBD perl modules were world-readable and world-executable. I
am
> approaching my unction. Could somebody please help? It seems like it
must
> be something in my environment, but it feels like I have tried all the
> options. I'm puzzled why there isn't more output from the trace, and why
it
> doesn't fail straight out.
>
>
>
> Anxiously awaiting any helpful suggestion,
>
> thanks in advance,
>
> Josh Horton
>