Installation Guide PHP on Windows IIS.
- Download the installation package PHP version 4.1.2 or higher available at http://www.php.net/downloads.php .
- Unpack the archive (for example: to d: php).
- Rename the file php.ini-recommended to php.ini. Copy php.ini to x: Windows.
- Open the file php.ini in Any text editor. Replace extension_dir =
with extension_dir = d: php extensions Replace doc_root =
with doc_root = "d: Inetpub wwwroot" Replace cgi.force_redirect = 1
with cgi.force_redirect = 0 Save changes.
- 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: php sapi php4isapi.dll;
Extension: type. Php; Uncheck the box Verify That file exists. Check the Script Engine box. - Each open Click OK in the dialog box to save changes.
- Right-click the Web Service Extensions item in the IIS tree bread. In the context menu, select the Add a New Web Service Extensions item.
- Click Add Required in the file section to assign a new filter name (. Php) and the path to php4isapi.dll. Should this file RESIDE in d: php sapi php4isapi.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 is added index.php 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
- Create a test.php file. Type The following directive in it:
<? phpinfo ();?>
- Save the file in the root folder of the site.
- Open the file in the browser: http://localhost/test.php.
- The browser will display the table with the PHP settings FOLLOWS Which Should look like (It Means That is Properly configured PHP on your server):
- Create a test.php file. Type The following directive in it: