Friday, April 27, 2007

PHP .ini File with IIS on Windows Server 2003

I had to install PHP 4 under IIS on Windows Server 2003. The manual installation went fine, but PHP was looking for the php.ini file in C:\WINDOWS. I already added my install directory, C:\php, to the PATH environment variable and rebooted the machine, but this didn't seem to matter.

Buried on one of the many posts on, I found a suggestion that worked. I had to add the following registry key (Start > Run > regedit)...
...with the string value name IniFilePath and the value c:\php. After I did this, I did a hard stop of IIS and restarted it and the change took fine and saw the proper php.ini file.
C:\>iisreset /stop
C:\>net start w3svc

No comments: