Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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:

C:\PHP5.4

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
add comment

1 Answer

up vote 0 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
add comment

Your Answer

 
discard

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.