Operating System - Linux
1752513 Members
5348 Online
108788 Solutions
New Discussion юеВ

Re: Perl with Oracle Connection through Apache

 
SOLVED
Go to solution
Raghu Chikkamenahalli
Frequent Advisor

Perl with Oracle Connection through Apache

Hi,

The script is executing from command prompt.

I have set export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ROACLE_HOME/lib32:$ORACLE_HOME/lib64 also.

But not executing through browser.

it says the following error.

Can't load '/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.10.1: cannot open shared object file: No such file or directory at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/DynaLoader.pm line 230.

Could any one answer for this question. it is very urgent and critical.

Regards
Krishna
6 REPLIES 6
Horia Chirculescu
Honored Contributor

Re: Perl with Oracle Connection through Apache

Hello from Romania,

ldd oracle.so should give you a list of all libraries linked to it. All of those libraries must be available or else you would end with a "cannot open shared object file" error.

So you would also need to add those paths to the library path.

Best regards,
Horia.
Best regards from Romania,
Horia.
Raghu Chikkamenahalli
Frequent Advisor

Re: Perl with Oracle Connection through Apache

Hello Romania,

Could you please provide me the examples for the LIBRAYR PATH and shared library path.


Regards
Krishna
Horia Chirculescu
Honored Contributor

Re: Perl with Oracle Connection through Apache

Let's consider the following library:

/opt/hpws/apache/stunnel/lib/stunnel.so

[hpux]:/root # ldd /opt/hpws/apache/stunnel/lib/stunnel.so
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libnsl.1 => /usr/lib/libnsl.1
/usr/lib/libxti.2 => /usr/lib/libxti.2
/usr/lib/libpthread.1 => /usr/lib/libpthread.1
[hpux]:/root #

This is a simple case, showing that you should consider adding also to the LD_LIBRARY_PATH the /usr/lib path.

Best regards,
Horia.
Best regards from Romania,
Horia.
Raghu Chikkamenahalli
Frequent Advisor

Re: Perl with Oracle Connection through Apache

Hello Romania,

Iam using Linxu RHEL5.4 x86_64 bit machine.

if i ran the ldd command. it gives the follwoing.

ldd /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/DBD/Oracle/Oracle.so
libclntsh.so.10.1 => /opt/oracle/db/10gR2/lib/libclntsh.so.10.1 (0x00002b337f1c4000)
libdl.so.2 => /lib64/libdl.so.2 (0x00002b3380663000)
libm.so.6 => /lib64/libm.so.6 (0x00002b3380867000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b3380aeb000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x00002b3380d06000)
libc.so.6 => /lib64/libc.so.6 (0x00002b3380f1e000)
libnnz10.so => /opt/oracle/db/10gR2/lib/libnnz10.so (0x00002b3381276000)
/lib64/ld-linux-x86-64.so.2 (0x0000003204400000)

Please my .bash_profile paths.

export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=$ORACLE_BASE
export ORACLE_SID=tftdb
export LD_LIBRARY_PATH=/usr/lib:$ORACLE_HOME/lib:$ORACLE_HOME/lib32:/usr/lib64:/usr/lib/oracle/10.2.0.3/client64/lib:/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/DBD/Oracle
export PATH=$PATH:$LD_LIBRARY_PATH:$ORACLE_HOME/bin
export TNS_ADMIN=$ORACLE_HOME/network/admin


Could you please tel me if did any mistakes here..

Regards
Horia Chirculescu
Honored Contributor
Solution

Re: Perl with Oracle Connection through Apache

Hello,

It seems to me that you should add to LD_LIBRARY_PATH:

/lib64

and

/opt/oracle/db/10gR2/lib/

You should add those at the end of the LD_LIBRARY_PATH.


Best regards,
Horia
Best regards from Romania,
Horia.
krishna1981
New Member

Re: Perl with Oracle Connection through Apache

Hello Romania


Thanks for the appropriate solution.

Oracle with perl problem solved.


regards
Krishna