Software
Install & Configure PHP 5.x on Windows Server 2003 with IIS 6
This guide will show you the necessary steps to install and configure PHP 5.2.1 (5.x)Â on Windows server 2003 using IIS 6 as the web application server. This guide does not show you how to install Windows server or install IIS, just the config steps neccesary after install.
Here are the steps;
- Install PHP
- Configure PHP
- Configure IIS
- Test the install
Here we go…
Step 1: Install PHP
- Get the latest version of PHP from php.net. Get the latest binaries but not the Windows installer as we are going to do all the dirty work by hand… Don’t worry, there’s not too much…
- Get the latest version of the PECL Modules too if you need these specific extensions for you application. If you’re not sure, get them anyway and wait until later in the install before loading them onto your server…
- Create a directory on the root of your server system drive in which to extract the PHP files. I use C:\PHP (tada!).
- Unzip the binaries into the C:\PHP folder. You will now have a directory structure that looks like this:
- C:\PHP
- C:\PHP\DEV
- C:\PHP\EXT
- C:\PHP\EXTRAS
- C:\PHP\EXTRAS\MIBS
- C:\PHP\EXTRAS\OPENSSL
- C:\PHP\EXTRAS\PDF-RELATED
- C:\PHP\EXTRAS\PEAR
This is the basic directory structure as of version 5.2.1.
- If you know you need the PECL extensions you can extract those now. If you’re not sure you can come back to this point later and extract them. Either way, extract the files into;
- C:\PHP\EXT
Step 2: Configure PHP
- In your C:\PHP directory you’ll find a file named php.ini-recommended. Rename or copy and rename that file as php.ini.
- Open php.ini up in your favorite text editor and preform the following edits (I’ve listed them in order as of PHP version 5.2.1)
- extension_dir = “c:\php\ext\”
- cgi.force_redirect = 0
- browscap = “c:\php\extras\php_browscap.ini”
- session.save_path = “c:\php\sessions\”
- Install a browscap.ini file. This is optional but prefered so right mouse click and choose Save Target As… here to get the php_browscap.ini that I’m using or else search and find the one you want. Then copy it to c:\php\extras\php_browscap.ini (rename it from .txt to .ini).
- Create a directory for the PHP session files. I chose to use C:\PHP\SESSIONS\ initilally. Create it here to start and when the install works then move it onto a different drive if you want.
- Add C:\PHP to your servers path environment variable.
- Right click My Computer, Properties and select the Advanced tab, then click on the Environment Variables button.
- Select the Path variable and click the edit button.
- Add C:\PHP; to THE BEGINING OF THE ENVIRONMENT STRING
- Click on OK.
- Add New variable PHPRC to the Environment Variables.
- Click the New button
- Variable name is PHPRC
- Variable value is c:\php
- Click OK.
- Clcik OK back to desktop.
Step 3: Configure IIS
Add PHP ISAPI Extension
- Open IIS Manger
- In the left pane select Web Service Extensions
- Click the link Add A New Web Service Extension…
- Extension name is PHP 5.2.1 Extensions (Name can be whatever you want)
- Click the Add… button
- The path to the file is C:\PHP\php5isapi.dll
- Check the Set Extension Status Allowed… checkbox
- Click OK to finish
Add .PHP Extension
- Right click on Web Sites and choose Properties
- Select the Home Directories tab
- Click on the Configuration button
- On the Mappings tab click the Add… button
- Executable browse to C:\PHP\php5isapi.dll
- Extension is .php
- Select Limit to: and type GET,POST,HEAD
- Check Verify that file exists and click OK. Then OK again to get back to the Home Directory tab of the Web Sites properties dialog
- Set Execute Permissions to Scripts only
-
Click OK.
REBOOT THE SERVER!
Step 4: Test the Install
- Download this test file and copy it to a working website folder on your web server. i.e. yourdomain.com/info.php (rename it from .txt to .php)
- Open the url in a browser http://yourdomain.com/info.php
- If the install is good you will see something that starts off like this;

Please look at the 6th entry, the path to the php.ini file. If it’s your path, you have a good install and you can continue with the rest of your setup for the particular PHP system you are putting in. If it’s not your path, go back to the Environment Variable setting and make sure you put the variable at the FRONT of the path string.
That’s about it, good luck! Stephen Tickner
Online Remote Backup
I’ve started promoting an online remote backup service. I’ve setup and used the product and its very good. I recently had an Iomega REV drive that I use every night for my backups fail. I had to rectify that situation quickly as I’m very serious about backup and recovery. I’ve been in this business long enough that I’ve seen grown men (and women) cry when they have lost all their data.
The REV drive in question was only a year old, but out od warranty, so I went and bought a new unit plus a 3 year warranty. Hell, who wouldn’t if they only seem to last a year before they take a big crap and die! Total cost to me was about $450. NOT GOOD!
Then I was introduced to Enveloc, who provide this online backup service. If only I’d known them a couple weeks before, I could have saved $450!
With this service I have a nightly backup to 2 remote servers that I can restore from any PC!
Bloody marvelous!

