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
|
|---|