Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

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

enter image description here

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?
share|improve this question
if you've "installed" xampp/apache then I'd argue there should be no need to manually set any path variables at all unless your installer specifies so (which would be strange since the installer should have taken care of it). I would reinstall the app since it looks like it didn't install correctly. As it looks to me now, you are trying to manually patch together a failed install. – August Jun 18 '12 at 13:35
Actually, I did install xampp 1.7.7 on a clean Windows Server 2003, target folder D:\xampp , but D:\xampp\php is not automatically added to system PATH or user PATH. After all, I always deem not polluting the global environment is a virtue. – Jimm Chen Jun 19 '12 at 8:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.