8i | 9i | 10g | 11g | 12c | 13c | 18c | 19c | 21c | 23c | Misc | PL/SQL | SQL | RAC | WebLogic | Linux

Home » Articles » Misc » Here

Configuration of PHP with IIS on Windows 2003

This article contains instructions for setting up PHP with IIS on Windows 2003.

  1. Download the Windows "zip package" of PHP. In this example I used version 5.1.4.

  2. Unzip the contents of the file into the "C:\php" directory.

  3. Add "C:\php" to the System Path.

    • Click the "Start" button, then right-click on "My Computer" and select the "Properties".
    • Select the "Advanced" tab and click the "Environment Variables" button.
    • In the "System variables" frame, highlight the "Path" variable and click the "Edit" button.
    • Add ";C:\php" to the end of the "Variable value" text, then click the "OK" buttons on all dialogs until you have exited the "System Properties" dialog.
    • Reboot the server.
  4. Copy the "C:\php\php.ini-recommended" file to "C:\php\php.ini".

  5. Make sure the following parameters are set correctly in the php.ini:

    • cgi.force_redirect = 0
    • doc_root = "c:\Inetpub\wwwroot"
  6. Open the IIS Manager dialog (Start > Administration Tools > Internet Information Service (IIS) Manager).

  7. Configure up the relevant website as follows:

    • On the tree, right-click on the relevant Website and select the "Properties" menu option.
    • Select the "Home Directory" tab and click the "Configuration" button.
    • On the "Mappings" tab, click the "Add" button.
    • Enter "C:\php\php5isapi.dll" as the "Executable" and ".php" as the "Extension". Accept the other default settings by click the "OK" buttons on all dialogs until you return the main screen.
  8. Configure the Web Service Extensions as follows:

    • On the tree, click on the "Web Service Extensions" node.
    • Click on the "Add a new Web service extension..." link in the right-hand pane.
    • Set the "Extension name" to "PHP", add "C:\php\php5isapi.dll" as a "Required file" and check the "Set extension status to Allowed" checkbox, then click the "OK" button.
  9. Restart the IIS Admin Service in the "Services" dialog (Start > Administrative Tools > Services).

  10. Create a file called "C:\Inetpub\wwwroot\phpinfo.php" with the following contents.

    <?php
      phpinfo();
    ?>
  11. Then test the configuration by using this URL (http://localhost/phpinfo.php) in a browser on the server.

For more information see:

Hope this helps. Regards Tim...

Back to the Top.