Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

In Control Panel->System->Advanced->Environment Variables, the PATH variable in the bottom part (the system, not just my profile) contains my perl path. Yet when I try to run system('perl ...') from a mod_perl2 script, it can't find the executable.

How come the system path variable doesn't affect all accounts, particularly the one Apache runs under?

share|improve this question

Have you tried logging out and in again or restarting the service after you made the change? The PATH is copied when a user logs in, or a service is started.

share|improve this answer
Yes, the whole machine has been restarted multiple times since then. – Kev Oct 8 '09 at 17:56
up vote 0 down vote accepted

My guess is that the account Apache runs under, its PATH does not contain '%PATH%' in order to preserve its inheritance from the whole system's PATH.

share|improve this answer
Is that how HKEY_USERS\S-1-3-18-1060284298-8856024091-725778743-9376\Environment is merged? – Kev Oct 19 '09 at 14:00
In fact, the account doesn't appear to have a Path key under Environment. At least, from perl backticks it says, "PATH=(null)". Now to find out which of these random S-n-n-... users is the right one... – Kev Oct 20 '09 at 17:38

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.