Perl Oracle DBI through Apache problem


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Perl Oracle DBI through Apache problem
# 1  
Old 01-07-2017
Perl Oracle DBI through Apache problem

Experts,
I've been struggling with making a Perl Oracle DBI script to work through my Apache webserver.
Mysql DBI scripts work fine, but I'm having issue's with Oracle.
The oracle script works on command line, but I'm getting an
"Internal Server Error" with apache

Sourcing the oracle .bash_profile before running the Oracle CGI script on command line works great, but I can't figure out how to do with apache.

I've set up the %ENV in the perl script to match the %ENV when oracle runs the command via command line.

Here's two command that show what's going on.
Code:
[root@server1 DBD]# /u01/app/oracle/product/11.2.0/DB11G/perl/bin/perl -le 'use DBD::Oracle; print $DBD::Oracle::VERSION'
Can't load '/u01/app/oracle/product/11.2.0/DB11G/perl/lib/site_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.11.1: cannot open shared object file: No such file or directory at /u01/app/oracle/product/11.2.0/DB11G/perl/lib/5.10.0/x86_64-linux-thread-multi/DynaLoader.pm line 203.
 at -e line 1
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

Code:
[oracle@server1 ~]$ /u01/app/oracle/product/11.2.0/DB11G/perl/bin/perl -le 'use DBD::Oracle; print $DBD::Oracle::VERSION'
1.20

Does anyone have any idea what's going on here?

Thanks in advance.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl DBI error

Hi All, I installed DBI module in a non INC location and using it in my script via "use lib". But it throw the below error at the "use DBI" step. Please help Usage: DBI::_install_method(dbi_class, meth_name, file, attribs=Nullsv) at /xx/xxx/xxxxx/xxxxx/oracle/lib/DBI.pm/oracle/lib/DBI.pm line... (2 Replies)
Discussion started by: prasperl
2 Replies

2. Shell Programming and Scripting

perl: help with DBI

Hi there, I have a bit of code similar to below (which ive actually got from perldoc, but mine is similar enough) $sth = $dbh->prepare(q{ SELECT region, sales FROM sales_by_region }); $sth->execute; my ($region, $sales); # Bind Perl variables to columns: $rv =... (4 Replies)
Discussion started by: hcclnoodles
4 Replies

3. UNIX for Advanced & Expert Users

Perl's DBI Module on OS X - uninstallable?

i've been struggling with installing the Perl DBI & DBD modules all weekend, and I'm getting close, but no cigar as of yet. When I run the perl script db.pl I get the following mismatch error: Mon Apr 19 09:43:29 EDT 2010 /Library/Perl/DBD-mysql-4.011 -> peterv@MBP17.local<515>$: db.pl | tee... (0 Replies)
Discussion started by: peterv6
0 Replies

4. Shell Programming and Scripting

connect to MySQL from Perl using DBI

Hi, I want to connect perl with the mysql to select and so on but the connection don't work code #!/usr/bin/perl BEGIN { # PERL MODULES WE WILL BE USING use DBI; $dbh = DBI->connect('DBI:mysql:C:\Program Files\MySQL\MySQL Server 5.0\data\db1','','pass') or die $DBI::errstr;} #... (1 Reply)
Discussion started by: eng_shimaa
1 Replies

5. UNIX for Advanced & Expert Users

Perl-to-Oracle performance: DBI-pack visa 'sqlplus' usage

I wondering if anybody tried already or know about the performance to process some Oracle staff from Perl. I see it could be done by the DBI pachage (so, I guess, it is interface to the OCI, but who know how sufficiant it is..,) with all gemicks around (define, open, parce, bind,.. ), or it can... (8 Replies)
Discussion started by: alex_5161
8 Replies

6. UNIX for Advanced & Expert Users

Apache module & perl problem

I have a very strange problem that I can't seem to solve. I have apache module which filters content and within that module I will add some more content based on this calls: int check; check = system("/usr/bin/check"); check is a perl-script that exits with value 1 if the file doesn't... (2 Replies)
Discussion started by: hjalle
2 Replies

7. Shell Programming and Scripting

Installing Perl DBI and DBD

Hi, i have some queries on installing the Perl DBI and the DBD Oracle. I know that i have to install the DBI first. I have the source files in a folder in my home directory.The commands to install arecd /home/DBI Perl Makefile.PL make make installI would like to know, after executing these... (4 Replies)
Discussion started by: new2ss
4 Replies

8. Programming

perl dbi to oracle getting disconnect_all for oracle dbi help

hi i am trying to connect to an oracle database using dbi and i get this :: Driver has not implemented the disconnect_all method. at /opt/perl/lib/site_perl/5.8.0/sun4-solaris/DBI.pm line 575 END failed--call queue aborted. for all i know, the script was working earlier, but has... (1 Reply)
Discussion started by: poggendroff
1 Replies

9. Shell Programming and Scripting

PERL DBI module install

We ran into an issue trying to install DBI and DB2 modules for perl for AIX from the link http://www-306.ibm.com/software/data/db2/perl/ We tried to install the DBI module using bash# perl -MCPAN -e 'install DBI' command. However we ended up with the following error. Stop. ... (3 Replies)
Discussion started by: jerardfjay
3 Replies

10. Shell Programming and Scripting

Perl DBI - Bind Parameters Problem

I have a SQL statement that includes a UNION that I can't get to work when I bind the parameters. (I am binding the parameters to prevent SQL injection.) Does anybody have any suggestion on how I can use a SQL statement that includes a UNION and bind the params? Code would be something like... (1 Reply)
Discussion started by: mh53j_fe
1 Replies
Login or Register to Ask a Question