Configuration PHP by Using the IIS Manager

Introduction

To configure PHP using the IIS Manager, use the following procedure.

Step 1

To start the IIS manager, go to: "Control Panel" -> "Adminstrative tools" -> "Internet Information Services (IIS) Manager", or you can simply write "inetmgr" in the Run prompt.

run.gif

Now click on "Ok". The IIS manager will then be opened.

iis-manager.gif

Step 2

Select the handler mapping in the IIS manager. At the right  top corner, click on "Open feature" -> "Add Module Mapping".

Step 3

Set the values as shown in the following figure. The request path should include all files with the PHP extension (*.php). Select FastCgiModule for the module, and php-cgi.exe for the executable file. You can choose any name you like.

Request-Restrictions.gif

Step 4

After filling in all the information, click on the "Request Restrictions" button.

Step 5

On the "Mapping" tab, check the "invoke handler only if request is mapped" check box and then click on the "File" option.

Step 6

On the verb tab, you can optionally set a restriction for the HTTP assignment methods.

Step 7

Thenn click "Ok" to close the "Request Restrictions" dialog box.

Step 8

Click "Ok" to confirm your choices.

Step 9

After completing all that, click "Yes" to confirm the module mapping.

Step 10

So at last you are able to run PHP as a FastCGI application.

Step 11

Create a file with the name "phpinfo.php" in "C:\inetpub\wwwroot" and use this code in that file: <?php  phpinfo() ?>

Step 12

Start a web browser, and then browse to the address http://localhost/phpinfo.php. The response contains the phpinfo() information with the current PHP settings, as shown in the following figure:

php-info-file.gif

You will have then successfully set up PHP.


Similar Articles