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?

Kev
  • 984
  • 4
  • 23
  • 46

2 Answers2

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.

Zoredache
  • 130,897
  • 41
  • 276
  • 420
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.

Kev
  • 984
  • 4
  • 23
  • 46
  • 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