Easysoft ODBC-ODBC Bridge

How do I pass LD_LIBRARY_PATH down to CGI programs from Apache?

Article:
00636
Last Reviewed:
28th October 2008
Revision:
2

If you are running an application using OOB under Apache as CGI (e.g. a perl script) on a platform where the dynamic linker needs to be told where to find all required shared objects using an environment variable your CGI program will need this environment variable set up. You need to add to your Apache configuration file (probably httpd.conf) a SetEnv (or PassEnv if Apache 1.1 or later) command similar to the one below:

SetEnv LD_LIBRARY_PATH
/usr/local/easysoft/unixODBC/lib:/usr/local/easysoft/oob/client:/usr/local/easysoft/lib

Not all dynamic linkers use LD_LIBRARY_PATH, some use LIBPATH, SHLIB_PATH etc. Check you dynamic linker documentation for the correct environment variable.

The Apache Group has full documentation for SetEnv.

The above assumes you are using straight CGI with your program running external to your web server. If you are running something like mod_perl where the Perl interpreter is built into Apache then you may need to tell your dynamic linker where to find OOB shared objects before Apache is started. For Apache you might set and export LD_LIBRARY_PATH etc in the apachectl.

Applies To

Knowledge Base Feedback

* Did this content help you?
* Please select one option based on your first choice:

(* Required Fields)


Oracle is a registered trademark of Oracle Corporation and/or its affiliates.