Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: DBD::Oracle installs under root only

by Corion (Patriarch)
on Oct 14, 2018 at 08:31 UTC ( [id://1223995]=note: print w/replies, xml ) Need Help??


in reply to DBD::Oracle installs under root only

This is because you have set up your root user environment to install Perl modules only for that user:

PERL5LIB="/root/perl5/lib/perl5:" PERL_LOCAL_LIB_ROOT=":/root/perl5" PERL_MB_OPT="--install_base /root/perl5" PERL_MM_OPT="INSTALL_BASE=/root/perl5"

Remove these settings and root will install modules for all users.

Replies are listed 'Best First'.
Re^2: DBD::Oracle installs under root only
by ojha (Initiate) on Oct 16, 2018 at 12:23 UTC

    Thanks a lot for your input. I have unset those variables, recompiled the DBD and installed it again. Now working fine for all users through cli. I am getting the following error when I am executing the same code through Apache web server cgi-bin:

    AH01215: install_driver(Oracle) failed: Can't load '/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.11.1: cannot open shared object file: No such file or directory at /usr/lib64/perl5/DynaLoader.pm line 190.

    httpd -v Server version: Apache/2.4.6 (Red Hat Enterprise Linux) Server built: May 28 2018 16:19:32

    uname -a Linux ess.saildsp.co.in 3.10.0-862.14.4.el7.x86_64 #1 SMP Fri Sep 21 09:07:21 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

    Oracle client 11gR2 I have set ORACLE_HOME and LD_LIBRARY_PATH in /etc/sysconfig/httpd I have also set LD_LIBRARY_PATH in /etc/ld.so.conf and executed ldconfig Pl. help

      The next step is to look where libclntsh.so.11.1 exists and to check if LD_LIBRARY_PATH includes that directory.

      Then, check whether the user(s) trying to use DBD::Oracle have read permission on the file and all directories upward of libclntsh.so.11.1.

      Back in the day, I had to run Perl code that was using DBD::Oracle on many UNIX platforms, Linux included. Running ldconfig should have done it, did you make sure and restart Apache after you ran ldconfig? The running web server won't have the new settings until you do that.

      If that doesn't do it, then what you might want to do is to add an explicit SetEnv in your httpd.conf - I remember having to do this too. See mod_env describing SetEnv for Apache 2.4.

        Thanks a lot for your input. After changing the permission of /home/oracle to 755 it is working fine

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1223995]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2024-04-19 12:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found