Guida all’installazione del php su IIS di windows.

  1. Download the PHP installation package version 4.1.2 or higher available at
  2. Unpack the archive (for example: to d:php).
  3. Rename the file php.ini-recommended to php.ini. Copy php.ini to x:Windows.
  4. Open the file php.ini in any text editor. Replace extension_dir =
    with extension_dir = d:phpextensions

    Replace doc_root =
    with doc_root = "d:Inetpubwwwroot"

    Replace cgi.force_redirect = 1
    with cgi.force_redirect = 0

    Save changes.

  • Copy the file php4ts.dll from d:php to x:WindowsSystem32.
  • Select in the menu Start -> Settings -> Control Panel -> Administrative Tools -> Internet Information Services (IIS) Manager.
  • Right-click your site in the Web Sites tree (in many cases it is indicated as Default Web Site). Select the Properties command in the context menu to open the site properties window.
    • Click the Home Directory tab.
    • In the Application settings section, select Scripts and Executables in the Execute Permissions drop-down list.

    • Then, click the Configuration button beside.
    • Click the Mappings tab.
      Applying extensions to the whole site on the Mappings tab allows the selected extensions to be used with all virtual folders of the site.

    • Click Add to set the path to ISAPI.DLL and specify the php file extension.

    • Fill in the dialog box fields in the following way:

      Executable: click Browse to locate php4isapi.dll or type or paste the path name: d:phpsapiphp4isapi.dll;
      Extension: type .php;

      Uncheck the Verify that file exists box. Check the Script Engine box.

    • Click OK in each open dialog box to save changes.

    • Right-click the Web Service Extensions item in the IIS tree pane. In the context menu, select the Add a New Web service extension item.

    • Click Add in the Required file section to assign a new filter name (.php) and the path to php4isapi.dll. This file should reside in d:phpsapiphp4isapi.dll.

      • Check the Set extension status to Allowed box.
      • Click OK.
    • Now you have to make index.php a default page. Do the following.
      • Right-click your site in the Web Sites tree. In the context menu, select Properties.
      • Click the Documents tab.
      • Click Add.

      • The Add Content Page dialog box will open. Type index.php in the Default content page field.

      • Click OK.
      • A new entry index.php is added to the end of the list. Click the Move Up button until you move index.php to the top.

      • Save changes by clicking OK.
    • For the changes to take effect, stop the IIS and then start it again.

      Checking PHP

      1. Create a test.php file. Type the following directive in it:

        <? phpinfo(); ?>

      2. Save the file in the root folder of the site.
      3. Open the file in the browser: http://localhost/test.php.
      4. The browser will display the table with the PHP settings which should look like follows (it means that PHP is properly configured on your server):


    Questo pagina è disponibile anche in: Neerlandese Tedesco Spagnolo

    Lascia un commento