Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to modify apache environment variables?

Status
Not open for further replies.

redss

Programmer
Oct 20, 2002
195
How do I modify environment variables in the apache environment? Do I modify httpd.conf?

I have apache 1.3.29.0.2-5 on Linux, and my problem is that my perl cgi script can't find their libraries when invoked thru apache, whereas the libraries are found when the script executed from a local shell (I installed and need to modify PERL5LIB to find it).
 
I mentioned that apache is running on Linux (Debian Knoppix 3.4 specifically)

is installed under my home directory, and perl scripts can find it when PERL5LIB is modified as follows:
Code:
export PERL5LIB=/home/knoppix/perl/lib/perl/5.8.4:/home/knoppix/perl/share/perl/5.8.4
 
Sorry about that.. Was reading this post with my Sidekick (very small screen) and thought you didn't specify an OS.

Anyways, add this to your httpd.conf

If you are using DSO
Code:
LoadModule env_module /path/to/apache/mod_env.so
SetEnv PERL5LIB /path/to/perl/lib
If you are using Static
Code:
SetEnv PERL5LIB /path/to/perl/lib

M. Brooks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top