Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: Strange behaviour with DBD::Oracle

by mrdvt92 (Acolyte)
on Sep 04, 2011 at 21:17 UTC ( #924123=note: print w/ replies, xml ) Need Help??


in reply to Re: Strange behaviour with DBD::Oracle
in thread Strange behaviour with DBD::Oracle

The oracle client is a fussy thing.

You have to have the environemnt configured correctly. But, if you are running SUID root the environment is not available to you. Catch 22!

My complany has packaged all of this mess away with RPM wrappers around the oracle instant clients that I cannot believe are not part of normal distributions.

For shell folks

echo -e "#Name: %{name}\n#Summary: %{summary}\n#Version: %{version}\ne +xport ORACLE_HOME=/usr/lib/oracle/%{version}/%{client_folder}\nexport + LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/lib/oracle/%{version}/%{clien +t_folder}/lib" >> "$RPM_BUILD_ROOT"%{_sysconfdir}/profile.d/oracle-en +vironment.sh

For http scripts

echo -e "#Name: %{name}\n#Summary: %{summary}\n#Version: %{version}\nS +etEnv ORACLE_HOME /usr/lib/oracle/%{version}/client64\nSetEnv LD_LIBR +ARY_PATH /usr/lib/oracle/%{version}/client64/lib" >> "$RPM_BUILD_ROOT +"%{_sysconfdir}/httpd/conf.d/oracle-environment.conf

For suid scripts

cp tnsnames.ora "$RPM_BUILD_ROOT"%{_sysconfdir} echo -e "/usr/lib/oracle/%{version}/%{client_folder}/lib" > "$RPM_BUIL +D_ROOT"%{_sysconfdir}/ld.so.conf.d/oracle-instantclient11.2-ldconfig. +conf ldconfig

Mike

mrdvt92


Comment on Re^2: Strange behaviour with DBD::Oracle
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (10)
As of 2014-10-23 21:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (129 votes), past polls