http://qs321.pair.com?node_id=1224104


in reply to Re: DBD::Oracle installs under root only
in thread DBD::Oracle installs under root only

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

  • Comment on Re^2: DBD::Oracle installs under root only

Replies are listed 'Best First'.
Re^3: DBD::Oracle installs under root only
by Corion (Patriarch) on Oct 16, 2018 at 12:26 UTC

    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.

Re^3: DBD::Oracle installs under root only
by Sinistral (Monsignor) on Oct 16, 2018 at 19:00 UTC

    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