PHP 5.x with IIS 6.0

Due to a hardware fault on our old web server I had to move this homepage to a new machine.

Previously we were running on Debian Linux with the Apache web server. The server I had “spare” is a Windows 2003 Server machine. I installed the IIS 6.0 on it and configured the PHP extensions.

I had serious issues getting it up and running on the different web sites so I will show you with this manual how you can easily install PHP on IIS 6.0 and troubleshoot if you have any issues.

For those who are interested here is the System Info of our new web server.

Read more to continue…

1. Install PHP

1.1 Download and unzip the latest version of PHP (5.2.3 at the moment) to C:\<Directory>\PHP\

* Download the latest Windows Binaries of PHP from and unzip it somewhere on your hard drive.
* Download the “PECL 5.2.3 Win32 binaries” zip file and extract the contents of that archive into C:\<Directory>\PHP\ext. It contains required extensions for mySQL or any other PHP addon. Move php5servlet.dll and php5activescript.dll from C:\<Directory>\PHP\ext into C:\<Directory>\PHP\.

1.2 Create php.ini
In your PHP directory, you’ll find a couple of php.ini-* files. For an easy initial setup rename the php.ini-recommended to php.ini.

2. Configure PHP mainly editing php.ini

2.1 Open the php.ini and uncomment cgi.force_redirect in php.ini and set equal to 0
*** This is a very important step, don’t neglect it. ***

2.2 Install a browscap.ini file
For scripts like phpMyAdmin please download the php_browscap.ini from to the extras directory under your PHP install directory (C:\<Directory>\PHP\extras\php_browscap.ini, for example), and change the browscap variable in php.ini to be the full path to the file (browscap=C:\<Directory>\PHP\extras\php_browscap.ini).

2.3 Create a session state directory and point the session.save_path php.ini variable to it. Create a session directory somewhere on the server or use the existing Windows one e.g. C:\Temp\. This directory will hold many small files with session variable information for PHP. Now change the value of the session.save_path variable in php.ini to be the full path to that directory (session.save_path=C:\Temp).

2.4 Setup the PHP extensions.
Now you have to enable some additional PHP extensions (For information on extensions, visit
The most important to start with is the extension=php_mysqli.dll simply remove the ; before it to enable the extension. This one is used for the mySQL database connection.

2.5 Create your PHP directory as variable PATH inside Windows
Make a rightclick onto My Computer – Press Properties – Select the Advanced tab – Click the Environmental Variables Button – Scroll down to PATH and double click same – Enter in there your PHP installation directory e.g. “C:\<Directory>\PHP\;” the final; is very important else none of your PATH info will work and your command prompt is useless 😉
Reboot your PC to enable the made changes.

2.6 Add the IniFilePath into the Registry.
Click Start – Run – fill in regedt32 – and press OK
In the Registry Editor please go the HKLM and create under Software a new Key named “PHP” inside this key you create a new Strink named “IniFilePath” with your PHP installation path as value

3. Configure IIS

Open the IIS mms. Click Start Administrative Tools – Internet Information Services (IIS) Manager

3.1 First you have to add the Web Service Extensions.
Press the + in front of your PC Name – select the “Web Service Extensions” – press “Add a new Web Service Extension” – Give the extension a nice name e.g. “ISAPI PHP Extension” – click Add and browse to your PHP installation directory ad select the php5isapi.dll – Check the “Set extension status to Allowed” checkbox and click “OK

3.2 Add new extension (.php)
Now you have to tell the IIS what it should do when a .php file is requested.
Right-click on “Web Sites” in the left pane, then click “Properties” in the menu that pops up – Flip to the “Home Directory” tab – Click “Configuration” – Click “Add…” – Browse to the php5isapi.dll in the “Executable” textbox – Enter “.php” in the “Extension” textbox – Select radial button “Limit to“, enter “GET,POST,HEAD“- Click “OK” all the way out
This will apply to every website.

3.3 Turn on scripting permissions for your websites
Right-click on “Web Sites“, goto Properties – Home Directory – Change the “Execute permissions” dropdown to “Scripts only“.

3.4 Restart IIS
Right-click the local computer in the left pane of IIS Manager, click on All Tasks – Restart IIS… – Enjoy
4. Test your setup

4.1 Create a new file named test.php in one of the websites e.g. C:\Inetpub\wwwroot
As content simply type in the following:


Open the newly created file with the web browser and you will see the php info page that indicates a successfull installation!

63 comments to PHP 5.x with IIS 6.0

  • Your style is very unique compared to other people I have read stuff from.
    Thank you for posting when you have the opportunity, Guess
    I will just book mark this site.

  • Really when someone doesn’t be aware of after
    that its up to other people that they will help, so here it occurs.

  • naturally like your website but you need to check the spelling
    on several of your posts. Several of them are rife with spelling problems and I in finding it very bothersome to inform the reality however I’ll definitely
    come back again.

  • My relatives always say that I am killing my time here at web, but I know I am getting know-how all
    the time by reading such good articles.

  • This is really interesting, You’re an excessively professional blogger.
    I’ve joined your feed and stay up for searching
    for extra of your magnificent post. Also, I have shared your site in my social networks

  • I was wondering if you ever considered changing the layout
    of your blog? Its very well written; I love what youve got to say.

    But maybe you could a little more in the way of content so people could connect with it better.
    Youve got an awful lot of text for only having 1 or two images.
    Maybe you could space it out better?

  • Hi there! This is my first visit to your blog! We are a team of volunteers and starting a new initiative in a community
    in the same niche. Your blog provided us valuable information to work on. You have
    done a outstanding job!

  • In my case, I began mentally calculating the miles per gallon on the freeway against how much fuel I had left within the

  • What’s Taking place i’m new to this, I stumbled
    upon this I’ve discovered It absolutely useful and it
    has helped me out loads. I am hoping to give a contribution & assist
    other users like its aided me. Good job.

  • of coᥙrse ⅼike your website however уou need to test
    the spelling οn quite а feԝ of your posts. Many of them are rife wіtһ spelling issues ɑnd
    I find it very bothersome t᧐ tell the truth then aɡain I wіll definitely comе аgain agаin.

  • Hello guys, I am Rima Morrison a professional in academic writing.

    I love solving people’s problems and make them happy. That is what I have been doing for many years now.
    I have been writing since I was 12 years old and never knew it would turn out to be a full-time career. I have also been able to manage several assignments that involves writing. And I worked in three organizations as a volunteer to assist people.My interest has always been to help people succeed. And I go the extra mile to make that happen.
    I enjoy writing books and have helped people from countries like UK.
    I work with a company whose mission is to provide quality works and make people happy. In fact, many clients come to me for professional help on a daily basis because they know I always deliver. And I will continue to provide nothing but the best to build trust like I have been doing for the past few years.

    Academic writer – Rima Morrison – Digitalassessments Corps

  • Hello, I’m Victoria Patton.
    Welcome to my website . I started writing in high school after a creative writing assignment for my English teacher. I did creative writing for a while before I thought about doing something else.
    I had always loved doing non-fiction writing because I’m passionate about learning. When you combine writing talent with a love of learning, academic writing only makes sense as a job.
    I’m passionate about aiding the students of the future in their school career. When they get too busy, I am there to help.

    Victoria Patton – Writing Expert – A2zcareers Corp

  • Extractiontcu

    ???????,??????????! .

Leave a Reply




You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Bandwidth utilization bar