in reply to Oracle DBI

You can't set or modify LD_LIBRARY_PATH in the script itself (or in any program) and have it affect the loading of shared libraries for that program. Setting LD_LIBRARY_PATH will only affect child processes of the process where it is set.

If you are running the Apache web server add an entry in httpd.conf that sets LD_LIBRARY_PATH correctly (something like SetEnv LD_LIBRARY_PATH /usr/local/(...)/lib should work). The alternative is to set the LD_LIBRARY_PATH in a shell script wrapper (ugh!).

Or, if you are running linux, add the Oracle library path to /etc/ld.so.conf and avoid the whole LD_LIBRARY_PATH issue altogether.

Michael