Enabling PHP5 on IIS6

This is a quick note for me so I don't forget how I did it (if I have to do it again in the future).

PHP5 doesn't automatically enable itself on IIS6. You have to do it by hand for each website you create. The first step, and I'm not positive it's necessary, is to create a new Web Service extension and allow it.

Go into IIS, Local Computer, and right click on Web Service Extensions and choose Add new web service extension. After this choose a descriptive name (like PHP x.x.x) and add php-cgi.exe for "Required files." Click OK. Then allow the new service that you created.

Then, on the website of interest, you have to add the application extension for PHP. Right click on the website and choose properties. Navigate to the Home Directory tab and click the Configuration button. From there, under Application Extensions click the Add button and add the .php extension and the php-cgi.exe to the fields listed. Click OK, click OK and that should do it.

Don't forget to add index.php to your list of default documents for the site.

Leave a Reply

Your email address will not be published.