Simon Gibson

Site Search:
ASP.NET Search for Index Server ASP.NET Suche für den MS/Indexdienst ASP Search for Index Server ASP Site Search for IIS web sites

Configuring PHP to run on IIS6 (Installer).
(Windows Server 2003)

About PHP.
PHP is an "Open Source" scripting language and provides very similar functionality to Microsoft's ASP. Obviously, both have their advantages and a comparison of the two technologies is outside the scope of this tutorial. However, a common misconception is that PHP is "Linux only" and not compatible with Microsoft systems.

To find out more about PHP, visit the following site:
http://www.php.net

 
 

1. Getting started - Choosing which package to download.

A visit to the www.php.net downloads page reveals a choice of two downloads in the "Windows Binaries" section:

  • PHP 4.3.4 zip package [6,815Kb]
  • PHP 4.3.4 installer [1,043Kb]

(Please note that later versions may be available as you read this)

The ZIP package is the preferred option simply because it includes greater functionality and extensions. However, this should be obvious from the much greater download size. If you prefer this method (it is strongly recommended) please visit the "CONFIGURING PHP TO RUN ON IIS6 (MANUALLY)" page to learn how to successfully install and configure it.

The "installer" is the easier of the two to install but not without it's bugs.

THIS TUTORIAL FOCUSES ON THE CONFIGURATION OF THE "INSTALLER" WHICH IS NOT THE PREFERRED METHOD!

Both packages can be downloaded from the following page:

http://www.php.net/downloads.php

 
 

 
 

2. Installing the Package

Figure 1 -Selecting Standard Installation
Figure 1 -Selecting Standard Installation

Despite what you might expect, the "Advanced" installation offers little over the "Standard" so it's best to simply go for standard. Don't worry about the "Mail Configuration" unless you know what you're doing - just click "Next".

Figure 2 -Selecting IIS6 Installation
Figure 2 -Selecting IIS6 Installation

Obviously, if you're installing onto Windows Server 2003, you need to change the selection to "Microsoft IIS 6 or higher" and click "Next".

A small box will appear to tell you that "IIS has been configured". Press "OK".

Figure 3 - Windows Script Host (ignore it)
Figure 3 - Windows Script Host (ignore it)

Closely followed by Figure 3 above (just ignore it and click "OK")

Figure 4 -Registering CScript (Click "No")
Figure 4 -Registering CScript (Click "No")

As VBScript has nothing to do with PHP just click "No" when Figure 4 (above) appears.

A couple of OK's later, PHP is installed. Well, not quite.

 
 

 
 

2. Configuring Internet Information Services (IIS) Manager:

Figure 5 - Web Service Extensions
Figure 5 - Web Service Extensions

If you are using the new style Start menu, you can reach the Internet Information Services console by clicking “Start”, “Administrative Tools” and selecting “Internet Information Services (IIS) Manager” from the list.

If you are using the “Classic” style Start Menu, you can reach the console by clicking “Start”, “Programs”, “Administrative Tools” and select “Internet Information Services (IIS) Manager” from the list.

We need to configure "Web Service Extensions" so right-click on "Web Service Extensions" in the menu on the left. Then select "Add a new Web service extension..." from the list (as shown in Figure 5 above)

Figure 6 - Creating a PHP web service extention
Figure 6 - Creating a PHP web service extension

Complete the dialogue box as shown in Figure 6 (above). Make sure you check the "Set extension status to Allowed" checkbox. The "Extension name:" is only a reference and hence can be anything - PHP makes it easy to identify in future though.

Figure 7 - The completed Web Service Extensions window
Figure 7 - The completed Web Service Extensions window

The completed "Web Service Extensions" window should now look like figure 7 (above).

 
 

 
 

4. Allowing index.php files to run as a directory default:

Figure 8 - Configuring your default PHP content page
Figure 8 - Configuring your default PHP content page

In "Internet Information Services (IIS) Manager", left-click on "Web Sites" in the menu on the left and select "Properties" (as shown in Figure 8 above). Next, select the "Documents" tab and click on "Add".

Figure 9 - Configuring your default PHP content page
Figure 9 - Configuring your default PHP content page

To ensure that index.php documents open as a default they should be added as a "Content Page" as shown in Figure 9 (above). You can, of course, change the importance of PHP over ASP and HTML documents to suit your site based on which document type should take preference. This can be achieved by moving "index.php" up or down the list using the "Move up" and "Move Down" buttons.

 
 

 
 

5. The Final Step - Moving the php.ini file:

For some reason, the Installer copies it's php.ini file into the "Windows" directory under the profile of the logged-on user rather than the root directory C: (where it should be).

  • Copy "php.ini" from C:\Documents and Settings\<username>\php.ini to C:\Windows

If you can't find "php.ini" simply open "My Computer", right-click on your C: drive and select "Search" from the list. Then type php.ini into the "All or part of the file name" box and press "Search". The file that appears in the right-hand side of the window should be copied into C:\Windows.

 
 
[Home] [3D Design] [Web Design] [Intranet/Extranet] [Personal]
Design and Content © Simon Gibson 2000 - 2010
[Email] [Site Map] [Search] [Privacy]
There are currently 25 users online.