Operating System - HP-UX
1748154 Members
3613 Online
108758 Solutions
New Discussion юеВ

Re: Unable to connect to Oracle database, using PERL script running on Apache server with mod_perl

 
Marjorie Vaughn
New Member

Unable to connect to Oracle database, using PERL script running on Apache server with mod_perl

Any suggestions where to look to resolve this error: Can't locate auto/DBI/connect.al

Much appreciated,
3 REPLIES 3
Tim Nelson
Honored Contributor

Re: Unable to connect to Oracle database, using PERL script running on Apache server with mod_perl

Does your perl implementation include the DBI and DBD-ORACLE modules ??


#!/usr/bin/perl
use ExtUtils::Installed;
my $instmod = ExtUtils::Installed->new();
foreach my $module ($instmod->modules()) {
my $version = $instmod->version($module) || "???";
print "$module -- $version\n";
}


If not then you need to get them from CPAN and figure out how to compile. Lots of threads on this forum on how ( it is not a task for the faint hearted, good luck ;)
Marjorie Vaughn
New Member

Re: Unable to connect to Oracle database, using PERL script running on Apache server with mod_perl

Yes, DBI-1.605 and DBD-Oracle-1.21 are installed in the /opt/perl_64 directory.
Ralph Grothe
Honored Contributor

Re: Unable to connect to Oracle database, using PERL script running on Apache server with mod_perl

Hi Marjorie,

I guess you already have confirmed that you can indeed load both modules DBI and DBD::Oracle?
Simple check would be to

$ perl -MDBI -e0

and

$perl -MDBD::Oracle -e0

Both commands should return without any output at all and RC == 0.

But your mod_perl could still be linked against another Perl installation on your system to which DBD::Oracle is unknown for instance.
I guess there are proper ways to verify this
but I know too little about mod_perl.
Anyway I would for once try this.
Both displayed paths should point to the same Perl installation.

e.g.

# strings /opt/hpws/apache/modules/mod_perl.so|grep perl/lib
/opt/perl/lib/5.8.3
/opt/perl/lib/5.8.3/PA-RISC1.1-thread-multi
/opt/perl/lib/5.8.3
/opt/perl/lib/site_perl/5.8.3/PA-RISC1.1-thread-multi
/opt/perl/lib/site_perl/5.8.3
/opt/perl/lib/site_perl


# perl -le 'print join("\n",@INC)'
/opt/perl5/lib/5.8.8/PA-RISC2.0-LP64
/opt/perl5/lib/5.8.8
/opt/perl5/lib/site_perl/5.8.8/PA-RISC2.0-LP64
/opt/perl5/lib/site_perl/5.8.8
/opt/perl5/lib/site_perl
.


Also, I am sure that once your Apache is mod_perl enabled and you GET a CGI serviced by mod_perl that in the webserver's HTTP response header as well as when you write or use a small mod_perl handler that simply dumps its environment, that you will get a hint which Perl version on the system was used to produce the response.
But sorry, I've forgotten the details because it's been too long since I last dealt with mod_perl.
Madness, thy name is system administration