1

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?

2 Answers 2

0

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.

1
  • Yes, the whole machine has been restarted multiple times since then.
    – Kev
    Oct 8, 2009 at 17:56
0

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.

2
  • Is that how HKEY_USERS\S-1-3-18-1060284298-8856024091-725778743-9376\Environment is merged?
    – Kev
    Oct 19, 2009 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, 2009 at 17:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .