Part 3 - Configure the PHP script mapping in IIS

To enable IIS to process PHP pages you have to add a script mapping for the .php file extension in IIS and set it to run under the FastCGI handler.

Follow the following steps to configure IIS:

  1. Add and allow the PHP FastCGI handler, C:\WINDOWS\system32\inetsrv\fcgiext.dll, to the IIS Web Service Extensions:
    1. Expand the local computer in the left pane of the IIS Manager.
    2. Right-click on the "Web Service Extensions" folder in the left pane.

    3. Click "Add a new Web service extension..." This will open the New Web Service Extension dialog box.
    4. Enter "PHP FastCGI" as the Extension name.

    5. Click the "Add..." button and then enter the full path to the fcgiext.dll file in the Add file dialog box. This should be: C:\WINDOWS\system32\inetsrv\fcgiext.dll

    6. Click OK to close the Add file dialog box. The fcgiext.dll file and path will be added to the list of Required files.
    7. Enable the "Set extension status to Allowed" option and then click OK.
    8. The new FastCGI extension will be created and displayed on the web service extension list with the status set to Allowed.

  2. Add the new .php extension mapping.
    1. Expand the local computer in the left pane of the IIS Manager.
    2. Right-click on "Web Sites" in the left pane and then click on "Properties" in the menu that pops up.

    3. The Web Site Properties dialog box will be displayed. Open the "Home Directory" tab.

    4. Click the "Configuration" button to open the "Mappings" tab on the Application Configuration dialog.
    5. On the Mappings tab make sure that the Cache ISAPI Extensions checkbox is selected.

    6. Click the Add... button. The Add/Edit Application Extension Mapping dialog box will open.

    7. Enter the full path to fcgiext.dll in the "Executable" field: C:\WINDOWS\system32\inetsrv\fcgiext.dll.
    8. Enter ".php" in the "Extension" field.
    9. Select the "Limit to" radio button and enter "GET,POST,HEAD".
    10. The Script engine and Verify that file exists checkboxes should already be checked. Leave them checked.
    11. Click the OK button to close this dialog box. Click OK on the next 2 confirmation dialogs.
    12. You will be back at the Web Sites Properties dialog box. Click the Apply button to save the changes to the home directory and all the sub-sites (if any).
    13. Click the OK button to close the Web Site Properties dialog box.

IIS will now be able to use FastCGI to process .php pages in the sites that you create in IIS.

The second part of the IIS configuration is to create a Moodle application.


Back | Home | Next
Contact