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

I am a novice with IIS on Windows Server 2008

My question is basically how to change the path of PHP.ini, due to phpinfo(); my PHP configuration is loaded from C:\windows when I have my mapped module linked to:


So How would I go about changing this around, I have performed some research into this subject, but it has not provided me with a solution.

I am on WIndows Server 2008 Running IIS 6.0 with a mapped module of PHP5.4

share|improve this question
up vote 2 down vote accepted

In Windows, you can set the search location in the registry.

Via the PHP Configuration File:

  • As of PHP 5.2.0, the location of the php.ini file can be set for different versions of PHP. The following registry keys are examined in order: [HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x.y.z], [HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x.y] and [HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x], where x, y and z mean the PHP major, minor and release versions. If there is a value for IniFilePath in any of these keys, the first one found will be used as the location of the php.ini (Windows only).
  • [HKEY_LOCAL_MACHINE\SOFTWARE\PHP], value of IniFilePath (Windows only).
share|improve this answer

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.