How to set specific environment variables for Apache service run on Windows
Posted
by
Jimm Chen
on Server Fault
See other posts from Server Fault
or by Jimm Chen
Published on 2012-06-18T01:37:27Z
Indexed on
2012/06/18
3:17 UTC
Read the original article
Hit count: 262
I'm facing a problem. I use xampp 1.7.7 on Windows which installs a Apache service. I find that I have to some tweak to have all PHP modules load properly.
For example, php_ldap.dll cannot be loaded.
It is mysterious why it cannot be loaded until I tried to run httpd.exe from command line, which reveals that libsasl.dll cannot be founded.
Actually, there exist D:\xampp\php\libsasl.dll but httpd.exe cannot find it.
OK. The best way is to add D:\xampp\php
to PATH env-var.
Now my question is: How do I set a specific PATH value for that specific Apache service but not system wide. -- because I think it is better not to disturb other processes with that extra PATH value.
- Is there a general way to do that for a specific Windows service?
- or, is there a Apache specific way to load extra env-var settings from some specific configuration files?
© Server Fault or respective owner