4th September 2007

How To Install PHP on IIS 6.0

posted in IIS 6.0, PHP |

I recently decided to experiment with hosting my own blog and after looking at the various packages available decided that I wanted to use WordPress. However, when it came to installing WordPress, I found that there was a lack of really good documentation available if you wanted to use IIS 6.0 as your web server. I also found quite a bit of contradictory information regarding the installation of PHP and MySQL on Windows 2003 – so I decided to write my own. This is the first of a series of articles which will provide a complete walkthrough enabling you to install PHP, MySQL and WordPress on an IIS 6.0 web server.

At the time of writing, the latest stable version of PHP is 5.1.4. Start by downloading the zip package and the Collection of PECL modules from here : http://www.php.net/downloads.php

#Note: You can use the Windows Installer package but it only installs and configures the CGI version of PHP which is not the best solution for an IIS web server; you should try to use the ISAPI version – if you really want to know more about why this ISAPI is preferable to CGI then I suggest you watch this IIS webcast :

TechNet Webcast: Comparing CGI and ISAPI in IIS 6.0 – Level 300


Install and Configure PHP

Start by creating a directory into which you will extract the downloaded PHP files (php-5.1.4-Win32.zip). In this example I’m going to use C:\PHP as my installation directory. Then extract the files from php-5.1.4-Win32.zip into C:\PHP

If you need to use the additional PECL modules then extract the files from ‘pecl-5.1.4-Win32.zip’ into the C:\PHP\ext directory.

Fig. 1

Next locate the file ‘php.ini-recommended’ in C:\PHP and rename it to ‘php.ini’ (without the quotes of course)

Fig. 2

Open the ‘php.ini’ file and find the line which reads extension_dir = “./” and change it to extension_dir = “C:\PHP\ext”. This tells PHP where the various extensions are located and as you can see the default path in the ‘php.ini-recommended’ file which ships with PHP points to the wrong location, so you need to change it.

You also need to add the location of your PHP directory to the server’s PATH environment variable so that Windows knows where to look for any PHP related executables (such as the PHP extension DLL‘s). To do this Right-click on My Computer, click Properties and on the Advanced tab click Environment Variables. In the Environment Variables dialog box, under System variables highlight the Path variable and click Edit.

Fig. 3

Add ‘;C:\PHP’ (be sure to include the semi-colon separator) as shown here and click OK. You need to re-boot the server for this change to take effect.

Fig. 4

If you browse through the ‘php.ini’ file you will see an entry describing the ‘cgi.force_redirect’ property. You will also see a statement telling you that if you are using IIS you ‘MUST’ turn this off. However, this only applies if you are using the CGI version of PHP (i.e. php-cgi.exe) Since we are using the ISAPI version of PHP we can safely ignore this – more details here : http://www.php.net/release_4_1_2_win32.php

You may have also seen various IIS and PHP HowTo guides which suggest that you need to copy your ‘php.ini’ and some other PHP related files to the C:\Windows\System32 directory – this is not actually necessary, as I shall demonstrate later in this walkthrough.

Pages: 1 2 3

This entry was posted on Tuesday, September 4th, 2007 at 2:20 pm and is filed under IIS 6.0, PHP. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

There are currently 213 responses to “How To Install PHP on IIS 6.0”

Why not let us know what you think by adding your own comment! Your opinion is as valid as anyone elses, so come on... let us know what you think.

  1. 1 On September 13th, 2007, Boaz said:

    Thank you very much.it was very simple and useful!

  2. 2 On September 17th, 2007, Ashish said:

    Thanks a lot for your detailed instructions.

    My process:
    I initially installed the msi installer, chose ISAPI. PHP worked fine, but could not make mysql run and my updates to the ini file did not work.
    But your tutorial did the trick.

  3. 3 On September 18th, 2007, Stephen said:

    In reading of other guides, it is suggested that when adding ‘;C:\PHP’ to PATH, that it be added to the beginning of everything (so you’d add C:\PHP; instead of ;C:\PH

    I dont recall the website or the specific reason. but remember it has something to do when getting mysql to run and it requires the php part before the mysql part can happen…

  4. 4 On September 18th, 2007, Sreedhar Rao said:

    I installed PHP 5.x version on IIS6.0 (Win2k3 Sp2), and verified that ISAPI is activated and default document list contains index.php. However, when I access the website through http://machinename/ it does not display the index.php; instead it gives me a 404 error. However, the same webpage shows up if I type http://machinename/index.php. I ran the IISRESET command multiple times, to reset IIS, but no luck. I tried to follow some posts on the web, but am still stumped.
    Any ideas why IIS would not display index.php when the filename is not specified? Any insight is greatly appreciated.

  5. 5 On September 19th, 2007, Jevon said:

    Can you just confirm that if a more up-to-date version of PHP is released, the update instructions are to simply unzip the new version over the top of the old?

  6. 6 On September 19th, 2007, Daniel Gutierrez said:

    thx a lot for this guide

  7. 7 On September 19th, 2007, Lensbøl said:

    But there is a Windowsinstaller which can install the Isapi version. What about that?

  8. 8 On September 20th, 2007, Matt Helms said:

    Thank you very much for the EXCELLENT write up.
    I’m a linux/unix guy by default and at times struggle with IIS.
    I installed php5.2 on IIS 6.0 today and couldn’t get it running.
    After reading through several tutorials that ommited A LOT of configuration information, I found the info I needed in your tutorial.

    Script mapping was looking at the wrong dll…
    Now we’re back up and running.

    Thanks – Matt Helms

  9. 9 On September 21st, 2007, Michael said:

    These are the best instructions i have found….

    Thanks so much

  10. 10 On September 24th, 2007, yo said:

    Thank you sooooo much!!! The install directions on the PHP site was nowhere near as good as this! Thanks!!

  11. 11 On September 24th, 2007, Gee said:

    This is a really easy to use tutorial for w2k3 users!

  12. 12 On September 25th, 2007, MJW said:

    These were well written and clear instructions. I followed the PHP section. In my case I needed to add 2 steps to the end of the process:

    1) I had to go into IIS and go to ‘Web Service Extensions’ and add ‘PHP’ and point it to ‘C:\php\php5isapi.dll’

    2) Go into my IIS website. Click on ‘Home Directories’ and then ‘Configuration’ and then ‘Add’ and enter the executable: C:\php\php5isapi.dll and the extension: .php

  13. 13 On September 25th, 2007, Peter said:

    Thanks a lot for your work, no problem to follow these clear instructions. I had installed the PHP CGI version before and did not get rid of error 404/2 when accessing index.php. Calling a HMTL document in the same directory is no problem. And after the old installation of PHP was removed and the ISAPI version was set up according to your advice, I tried index.php and …. got HTTP error 404/2. Who said life was easy? Good news is that I am not alone with this problem.

  14. 14 On September 26th, 2007, Paul Lynch said:

    Hi All,

    Apologies for the delay in replying – I’ve been on holiday for a week.
    Thanks for all your encouraging comments. Its good to know that someone has found this stuff useful 🙂

    @ MJW – I think perhaps you missed them because the steps which cover adding the web service extension and the application mapping in IIS are covered in the walkthrough here : http://www.iisadmin.co.uk/?p=4&page=2

    Paul Lynch

  15. 15 On September 26th, 2007, Paul Lynch said:

    @ Peter (http://www.iisadmin.co.uk/?p=4#comment-30)

    A HTTP 404.2 status code means “Web service extension lockdown policy prevents this request” which suggests that you haven’t configured and/or allowed the appropriate web service extension in IIS. Follow the steps in the article which cover adding the web service extension and you should be set.

    Paul Lynch

  16. 16 On September 26th, 2007, Peter said:

    Paul, thanks for your time
    I wished this was the reason, PHP ISAPI is allowed. and under ‘required files’ C:\php\php5isapi.dll is allowed, executing scripts is granted, all permissions are there for all kind of users (I promise to change that dramatically as soon as PHP works). and I checked again that the path c:\PHP\ is there and rebooted. I still get 404/2. We have one thing in common, I do not believe it either.

    … Peter, Paul, where is Mary?

  17. 17 On September 27th, 2007, Paul Lynch said:

    @Jevon (http://www.iisadmin.co.uk/?p=4#comment-19)

    I can’t confirm that I’m afraid as I’ve never tried it. I’ll test it out in a virtual machine build and see if it works.

    Paul Lynch

  18. 18 On September 27th, 2007, Paul Lynch said:

    @Peter (http://www.iisadmin.co.uk/?p=4#comment-37)

    Have you tried deleting and re-creating the PHP ISAPI web service extension ? A 404.2 status code is quite specific and really does mean “Web service extension lockdown policy prevents this request” so I can’t think what else to suggest.

    You could try running Sysinternals Filemon on the server whilst making a request for a PHP to see if it is a permissions problem but, to be perfectly honest, I think you have mis-configured IIS in some way – if it really was a permissions issue you would probably get a different error message.

    Paul Lynch

  19. 19 On September 27th, 2007, Paul Lynch said:

    @Stephen (http://www.iisadmin.co.uk/?p=4#comment-14)

    I have seen this before – it is to do with the PATH which Windows searches when looking for the libmysql.dll file.

    If you have both PHP and MySQL installed on a server you will see this file in both your PHP folder and your MySQL\bin folder.

    If the MySQL entry appears in your system’s PATH before the PHP entry then PHP will attempt to use the first libmysql.dll file it finds, which in this case will be the version in the MySQL\bin folder.

    Unfortunately the version of libmysql.dll which actually ships with MySQL doesn’t get on very well with the php_mysql.dll and php_mysqli.dll files which PHP uses to connect to MySQL (and which you can find in your PHP extensions folder) – so this causes it to break.

    Paul Lynch

  20. 20 On September 27th, 2007, Peter said:

    Paul, I deleted the web service extension for PHP and inserted it again. No change. The filemon for w3wp.exe Process 5220 is certainly the solution for you (I must confess, not for me):
    ThreadCreate SUCCESS
    RegQueryKey HKU\S-1-5-20_CLASSES SUCCESS
    RegOpenKey HKU\S-1-5-20_CLASSES\.php NAME NOT FOUND
    RegOpenKey HKCR\.php SUCCESS
    RegQueryKey HKCR\.php SUCCESS
    RegOpenKey HKU\S-1-5-20_Classes\.php NAME NOT FOUND
    RegQueryValue HKCR\.php\Content Type NAME NOT FOUND
    RegCloseKey HKCR\.php SUCCESS
    CreateFile C:\Inetpub….index.php SUCCESS
    QueryInformationVolume ….index.php SUCCESS
    QueryAllInformationFile ….index.php BUFFER OVERFLOW
    CreateFile C:\Windows….404b.htm SUCCESS
    QueryInformationVolume ….404b.htm SUCCESS
    QueryAllInformationFile ….404b.htm BUFFER OVERFLOW
    QueryStandardInformationFile …404b.htm SUCCESS
    ReadFile …404b.htm SUCCESS
    Close ….index.php SUCCESS
    Close ….404b.htm SUCCESS
    ThreadExit SUCCESS

    the index.php only contains

    would be great if you could help, thanks in advance

  21. 21 On September 28th, 2007, Paul Lynch said:


    I’m afraid this hasn’t helped me either :-/ Can you enable full logging on your web site and post the relevant log file extract which shows a HTTP request being made for your index.php file ?

    Paul Lynch

  22. 22 On September 28th, 2007, Peter said:

    Paul, here is the line.

    I am acessing the server from my LAN but the same error occurs when calling the page from outside.
    #Fields: date time s-sitename s-computername s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent) cs(Cookie) cs(Referer) cs-host sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken
    2007-09-28 14:01:18 W3SVC?????????? HOMER GET /index.php – 80 – HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.1) – – http://www.homersoftdesign.de 404 3 50 1795 354 0

    Thanks for your help

  23. 23 On September 29th, 2007, Paul Lynch said:


    You’re now getting a 404.3 error which means “MIME map policy prevents this request”

    It looks like you haven’t configured the Application Extension correctly for PHP on your web site. I was able to re-create this scenario and generate a 404.3 status code simply by removing the PHP scriptmap from a web site.

    In order for this to work properly you need both a Web Service Extension defined globally in IIS and an Application Extension defined at the web site level as detailed here : http://www.iisadmin.co.uk/?p=4&page=2

    Paul Lynch

  24. 24 On September 29th, 2007, Peter said:

    Paul, Thank you very much. It is working now. Great help

  25. 25 On September 29th, 2007, Paul Lynch said:


    You’re welcome. I’m glad we got it working.

    Paul Lynch

  26. 26 On October 2nd, 2007, ramsri said:

    Hi Paul,
    I’m trying to add mapping with the following scenario. I’m working on a Dedicated Virtual Server which is having Plesk installed in it. And by default Plesk installed PHP5 in that. so I want to configure php to IIS with those extenstions. So when i’m trying to do mapping and its path is C:\Program Files\SWsoft\Plesk\admin\bin\php5isapi.dll. When I tried this command

    C:\Inetpub\AdminScripts>cscript adsutil.vbs set W3SVC/396735398/root/Scriptmaps “.php,.html,C:\Program Files\SWsoft\Plesk\admin\bin\php5isapi.dll,5”
    Microsoft (R) Windows Script Host Version 5.6
    Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

    Scriptmaps : (LIST) “”.php,.html,C:\Program” “Files\SWsoft\Plesk\admin\bin\php5isapi.dll,5”

    got the above result. So unable to create mapping and unable to run php for that site. I even tried manually through these steps

    Start->Control Panel->Administrative Tools->Internet Information Services-> (then select your web site) ->Properties->Home Directory->Configuration->Mapping

    when trying to add this path

    C:\Program Files\SWsoft\Plesk\admin\bin\php5isapi.dll

    giving error messages blanks not allowed.

    Please assist me in this issue. It will be great help. Thanks in advance.

  27. 27 On October 3rd, 2007, ramsri said:

    Hi Paul,
    At last able to configure it.. need to create application poll for that site.. Then I’m able to run php….

  28. 28 On October 3rd, 2007, Paul Lynch said:


    You probably need to enclose your path in quotes as it contains spaces.

    Paul Lynch

  29. 29 On October 5th, 2007, Mark said:

    This site is definately the best I’ve seen. Worked perfectly, until I got to this part of page 3 of the notes:

    However, if you look carefully at the above page you will notice it is indicating that my ‘php.ini’ file is actually located in ‘C:\WINDOWS’

    I set the PHPRC environment variable to G:\PHP which is where I have installed PHP to and where the PHP.ini file is. I rebooted the server and my previously working page localhost/index.php now gives the 404 page not found error. I have definately got the file there, and I have definately set the web service extension, to point to g:\php\php5isapi.dll and allowed it, and I have set the home directory configuration properties to also include the .php extension and that points to g:\PHP\php5isapi.dll as well. It was working fine before rebooting the server, so I tried removing the PHPRC system variable and rebooting again, but it still does not work. I have also tried recreating the web service extension and the whole site, but no good. I’d really appreciate some help.

  30. 30 On October 5th, 2007, Paul Lynch said:

    Hi Mark,

    Can you enable full logging on your web site and post the relevant log file extract which shows a request being made for your index.php file ? Its always useful when troubleshooting to see the full HTTP status code (both sc-status and sc-substatus) that is being returned by IIS.

    Paul Lynch

  31. 31 On October 5th, 2007, Kevin Gagel said:

    I kept getting the http error 404 page not found error. I finally tried adding the trailing backslash to the path of the PHPRC environment variable. Suddenly everything started working. For some reason PHP can’t work if you set that variable to just “C:\PHP” but it does work when you set it to “C:\PHP\”. Go figure.

  32. 32 On October 5th, 2007, Paul Lynch said:


    I just checked my machine and I definitely haven’t got a trailing backslash in my PHPRC environment variable. Go figure, indeed…

    Paul Lynch

  33. 33 On October 9th, 2007, Sovath said:

    Thank you very much. It is very useful information.

    I wonder if somebody can help me. First of all, I mistakenly created c:\inifile under c:\PHP folder, rebooted and tested. It didn’t show as instructed. Then I moved the inifile folder to under c:\ root. Rebooted and tested again still didn’t change. I did created a new variable as instructed. But it still didn’t show. The indexphpinfo worked. Another thing is where can I edit the file under the regedit?

    Thanks for your help.

  34. 34 On October 10th, 2007, Paul Lynch said:

    Hi Sovath,

    You can also specify the location of your php.ini file in the registry at this location : HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath

    The order in which PHP searches for its ini file is documented here : http://us2.php.net/configuration

    Paul Lynch

  35. 35 On October 10th, 2007, Red said:

    Am getting a error 500 in my logfiles i can see that, and once i try to load my page its just blank,doesnt tell me anything,it doesnt wanna show me the index.php
    could anyone help?

  36. 36 On October 10th, 2007, Red said:

    fixed,ty anyway =)

  37. 37 On October 10th, 2007, Mark said:

    I tried the trailing backslash in the path, and rebooted, but no help. Log file says:

    #Software: Microsoft Internet Information Services 6.0
    #Version: 1.0
    #Date: 2007-10-10 11:22:56
    #Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status
    2007-10-10 11:22:56 GET /index.php – 80 – Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727) 404 0 0

    I don’t have a PHP folder in HKLM\SOFTWARE, which I wonder if I should.

  38. 38 On October 10th, 2007, Paul Lynch said:

    Hi Mark,

    I’m puzzled by this one I’m afraid. A 404 is a straightforward File Not Found, not permissions or anything else. Have you tried running Filemon to see what’s happening when the request is made ?

    Also, check that there really is a file called index.php in your web root – in other words, not one called index.php.txt with the .txt extension not visible because ‘Hide Extensions for known file types’ is ticked in Windows Explorer.

    Paul Lynch

  39. 39 On October 10th, 2007, Sovath said:

    Hi Paul,

    Thanks very much. It’s very helpful. The reason I’m setting up PHP on IIS6 is to be able to run EasyPHPCalendar on my intranet server. I got PHP to work but I’m stuck at being unable to change the easyphpcalendar php file permission. The Easyphpcalendar rerquired me to change the permission on three of their files before getting the calendar to work. My FTP program (CuteFTP) doesn’t give me an option to change the file permission under properties/chmod. It is not grayed out anything. It’s blank. They told me that it’s about my server’s permission and I couldn’t figure out how to do that.

  40. 40 On October 11th, 2007, Ryan said:

    This maybe stupid question of the day, but I’m new to PHP in general so I’ll throw this out there.. After doing the first reboot I per these directions I got everything working fine. The ini file does indeed say it’s in the wrong place, but if everyhing is working without having to add in the PHPRC variable, what is wrong with leaving it as is? Will there be features in PHP not usable or will there be performance issues?


  41. 41 On October 11th, 2007, Susan said:

    Just to say thanks – I followed your instructions and got php working with IIS. I previously tried using the windows installer without much luck – the manual install worked well.

  42. 42 On October 12th, 2007, Mark said:

    Ryan, I’m new to PHP as well, so I just followed the guide. I’ve now set it up on a new server and it works fine on that server. Shame it’s not really usable as I just installed windows 2003 onto an old celeron 1GHz machine to see if I could make PHP work.

    Paul, thanks for the suggestions. I have definately got an index.php file there, and it is not a .txt hidden file extension either.

    Having installed Filemon, I can see that it was looking for g:\inetpub\wwwroot\index.php, but the website is g:\inetpub\wwwroot\intranet08\index.php. I found that in the php.ini file the doc_root variable was set to G:\inetpub\wwwroot and changing this to include intranet08 on the end has made it work again.

    This is not ideal, so being the PHP novice that I am, is it safe to remove this setting totally, or do I need to leave it as it is. Ideally I might want other web sites in WWWROOT folder to use PHP and I will want subfolders to use it too within intranet08 folder.

  43. 43 On October 12th, 2007, Paul Lynch said:

    @Ryan (http://www.iisadmin.co.uk/?p=4#comment-108)

    If you look at the output of your phpinfo page (as per the article) you will probably see that PHP is specifying C:\Windows as its configuration file path without actually specifying a filename.

    What this means is that PHP is running with its default values and that you won’t be able to make any configuration changes using a config file.

    If all you want to do is run PHP scripts then this is probably OK but you won’t be able to load any modules which enable additional functionality such as connecting to a MySQL database, etc.

    Paul Lynch

  44. 44 On October 12th, 2007, Paul Lynch said:

    @Mark (http://www.iisadmin.co.uk/?p=4#comment-111)

    Your best bet is to comment out the doc_root value in your php.ini file. Then each site in IIS will use it own root as the doc_root value for PHP scripts.

    I have just tested this and works OK on IIS 6.0 – each site returned a different value for doc_root in my phpinfo tests.

    Paul Lynch

  45. 45 On October 17th, 2007, Justin said:

    I am trying to run php on IIS 6.0 on NT 2003. I followed several different setup instructions but ultimately my httperr log shows:

    2007-10-17 17:46:12 1141 80 HTTP/1.1 GET /a.php – 1 Connection_Dropped DefaultAppPool

    I can load up my standard index.html, but whenever I try a php file I get this error. Locally running my test php file phpinfo(); ‘php a.php’ from the command line seems to work:

    PHP Version => 5.2.4

    System => Windows NT FM5SGCEDEVS04 5.2 build 3790
    Build Date => Aug 30 2007 07:05:48
    Configure Command => cscript /nologo configure.js “–enable-snapshot-build” “–with-gd=shared”
    Server API => Command Line Interface
    Virtual Directory Support => enabled
    Configuration File (php.ini) Path => C:\WINDOWS
    Loaded Configuration File => C:\php\php.ini
    PHP API => 20041225
    PHP Extension => 20060613
    Zend Extension => 220060519
    Debug Build => no
    Thread Safety => enabled
    Zend Memory Manager => enabled
    IPv6 Support => enabled
    Registered PHP Streams => php, file, data, http, ftp, compress.zlib
    Registered Stream Socket Transports => tcp, udp
    Registered Stream Filters => convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, zlib.*

    Thanks for your help!

  46. 46 On October 20th, 2007, Susanne said:

    don’t forget enhanced security of w2k3!

    before you can run http://localhost/index.php or any other, you first have to run cscript.exe adsutil.vbs set w3svc/createprocessas user false


  47. 47 On October 20th, 2007, Paul Lynch said:


    I’m puzzled as to why you think you need to execute that command just to run PHP scripts on an IIS 6.0 server.

    I’ve never had to do that to get PHP scripts to run on my IIS 6.0 machines.

    Paul Lynch

  48. 48 On October 24th, 2007, Alex Adao said:

    I just installed php5 on windows 2003 and I was having error 404. In my case, I installed the php5 on c:\program files\php, and execution path for php on the IIS6.0 was saying that it was on c:\program~1\php. It looks like that it doesn’t like dir with spacings, so I changed to “c:\program files\php” (has to be in quotas) and worked fine.

    –Alex Adao

  49. 49 On October 29th, 2007, Rajesh Maurya said:

    Try running the below code to display the phpinfo result for your webserver.


    PHP Server Info

    Your browser is

    Your browser’s capabilities are:


    Rajesh Maurya

  50. 50 On November 3rd, 2007, David Stevens said:

    Previously used your guide for installing on IIS – worked great. Doing a re-install of Win2K & IIS with PHP and needed help to get past a couple of rough spots. I was able to recall steps in IIS5 by following your guide for IIS6.

    Thanks for this tutorial!

  51. 51 On November 8th, 2007, Randy Ainslie said:

    Great help on this site… only one thing.. where does the magic number: Web Site ID 87257621 …come from?

  52. 52 On November 8th, 2007, Paul Lynch said:


    The Web Site ID 87257621 is the site ID of the site I used for the purposes of the tutorial.

    “When you create a new Web site through the Internet Services Manager (ISM) in Internet Information Services (IIS) 6.0, an identification number for that site is automatically generated and stored in the metabase. The number is based on the name of the Web site. In earlier versions, the Web site identification numbers are incremental.”

    Taken from :

    Paul Lynch

  53. 53 On November 13th, 2007, Tim said:

    This is great and exactly what I needed!
    Thank you very much for publishing!

    The website ID was the only thing that
    went wrong (had to use number 1 instead
    of your magic number).


  54. 54 On November 16th, 2007, Emmanuel D'Herrera Argaez said:

    I was looking for a guide like this for weeks, thank you, in invaluable this site.

  55. 55 On November 18th, 2007, Boris said:

    Hi Paul,

    Thanks for your guide. I wish I’d find it 2 days ago when I was still struggling setting up my server…

    I have one question. I added index.php to the default content page and it works fine, however I get problem when I need to pass parameters to index.php file.

    http://www.mysite.com/ – works and shows index.php page
    http://www.mysite.com/index.php?param=1 – works
    http://www.mysite.com/?param=1 – fails with the error “The page cannot be displayed.”

    Is there any configuration setting that I need to modify to make this work?


  56. 56 On November 20th, 2007, Adrian Luke said:

    I wish I was one of the lucky ones to get php working but alas my feeble mind cannot navigate these instructions with any success. I downloaded the last php 5.25 and attempted to install it to my pc. I’m running xp with IIS 5.1. I am unclear as to whether I put the php.ini file in C:\WINDOWS or just leave it in C:\php. I have been working on this at school with limited success using the cgi.exe. Should I use that because I’ve tried. The results are no matter which application I use a window that resembles DOS operations always appears with nothing in it. Can I get help?

  57. 57 On November 21st, 2007, Przemek Koszka said:

    Great guide. Worked fine for me until i stared with MySQL and php.ini path.

    PHP itself works fine with all default settings and path pointing to c:\windows. I have installed MySQL, tried to run PHPMyAdmin – both are working as MySQL command line is ok. PHPMyAdmin starts but returns error that extension can’t be loaded.

    Ok, so i have pointed PHPRC path to c:\php , configured proper folder for extensions… and then whole PHP gone mad. I have switched on all reporting on errors in php and loging.

    From IIS i have:
    2007-11-21 09:40:37 GET /index.php – 80 – Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322) 200 0 0

    But the most funny thing is error msg from PHP:

    “PHP Startup: c:\php\ext\php_exif.dll – the specified module could not be found”

    Of course this msg appeared for other .dll files also. I have checked and the files are exactly under that folder. Security permisions – everyone full access.

    Some website suggested to check if C:\PHP and c:\php or any other combination of capital letters will help. Didn’t work.

    I also tried to put default php.ini (install again) as I thought maybe there was something wrong with it… no result.

    Did someone had that problem before?

  58. 58 On November 26th, 2007, Ryans Blog » Blog Archive » Installing WordPress on Windows 2003 Server said:

    […] http://www.iisadmin.co.uk/?p=4 […]

  59. 59 On November 27th, 2007, Marcin said:

    I have tried almost everything using the auto install. I keep getting the “error trying access http.conf file”

    What the …. ? Please help.


  60. 60 On November 27th, 2007, Marcin said:

    The last post was installing PHP on IIS 6.0 and SBS 2003 R2. In auto install i chose the IIS ISAPI.

    Thanks in advance.


  61. 61 On November 27th, 2007, Marcin said:

    Never mind the previous post. I got it working by doing the manual install. One problem though. Both my OMA and OWA now do not work. I get the HTTP Error 405 – The HTTP verb used to access this page is not allowed.

    Pls help


  62. 62 On November 28th, 2007, domo said:

    Just Great

  63. 63 On November 29th, 2007, kyle said:

    Complete xp server newbie here but I need to make changes locally to php files and test b4 sending them to my main server

    I downloaded PHP 5.2.5 Installer after having added IIS in Services of WINXP.
    I then simply ran the php installer and had to select IIS server or NONE. I chose IASPI and it seemed to install error free
    When I create TEST.PHP and place it in my in C:\Inetpub\wwwroot, then try to open with IE, it won’t and Dreamweaver wants to open it…
    Any suggestions?

  64. 64 On November 29th, 2007, Paul Lynch said:


    It sounds like you are trying to open the file directly rather than via IIS – in other words you are trying to open the file as C:\Inetpub\wwwroot\test.php rather than as http://localhost/test.php

    If it is the former then maybe the file extension ‘.php’ is associated with Dreamweaver on your machine which is probably what is causing Dreamweaver to load when you try to open it. Or maybe Dreamweaver has its own built-in web server – I’m not that familiar with Dreamweaver to be honest.

    Paul Lynch

  65. 65 On November 29th, 2007, kyle said:

    thanks for the fast reply, I am still getting prompted to OPEN the file in my editor..
    When installing PHP5.25 it ask me which server to install.. Should I be choosing NONE here and letting the IIS server I installed off the WinXP services do its job?

  66. 66 On November 29th, 2007, Marshall Clark said:

    Many thanks for this manual. It helped me install PHP without prior knowledge of the product (Fred Flintstone, I know him). I decided to install using the PHP manual install procedures since I was installing to a production system. All of the warnings about the Windows installer version scared me, so I attempted the manual install. Sugar CRM requires PHP and our host server didn’t have it, thus our need for PHP.
    I did have one question regarding the presence of PHP within the Windows registry. PHP is not listed in the HKEY_LOCAL_MACHINE/SOFTWARE directory. Have I missed something?

  67. 67 On November 29th, 2007, Eric said:

    I also had to do the following:
    1) I had to go into IIS and go to ‘Web Service Extensions’ and add ‘PHP’ and point it to ‘C:\php\php5isapi.dll’

    2) Go into my IIS website. Click on ‘Home Directories’ and then ‘Configuration’ and then ‘Add’ and enter the executable: C:\php\php5isapi.dll and the extension: .php

    I don’t mind putting the php.ini file in a seperate directory, it makes sense, but probably within the C:\php directory.

  68. 68 On November 30th, 2007, Paul Lynch said:

    @Marshall Clark ,

    The manual installation method in this article doesn’t modify the Windows registry so you don’t need to worry about it. With this method the only changes made to your system are the ones you make yourself – which is why I like it so much, you know exactly what has changed so its easy to roll it back cleanly should you need to.

    Paul Lynch

  69. 69 On November 30th, 2007, Paul Lynch said:


    Both of those steps are clearly listed in the article on page 2.

    Paul Lynch

  70. 70 On November 30th, 2007, Brad Ancevic said:

    Great guide! I was wondering if this guide can be used with IIS 5.1. I am looking to setup WordPress locally on my machine and I run Windows XP Pro, and was wondering if this would work? Please email me back: brad@ancevic.com

    Thanks again!!


  71. 71 On December 3rd, 2007, Paul Lynch said:


    You could use this guide for setting up PHP on Windows XP but there are a number of steps which would not be applicable to IIS 5.1, such as creating a web service extension, etc. I’m going to be posting a version specifically for IIS 5.1 on Windows XP soon.

    Paul Lynch

  72. 72 On December 4th, 2007, Filip T said:

    Hi Paul,

    first of all, thanks for the howto but unfortunately I can’t get it to work..

    I’m running Win 2K3 and had downloaded php-5.2.5.tar.gz and pecl-5.2.5-Win32.zip from the php.net website.
    I proceeded as you suggested in your manual, but however the php-5.2.5.tar.gz didn’t seem to contain the php5isapi.dll which was needed.So I downloaded the installer and installed it over the files I had extracted from the tar.gz.

    After having installed the php-5.2.5-win32-installer.msi I could map the php extension to the php5isapi.dll.

    When I try to open the proposed index.php file through http://localhost/index.php, I get a 404 error.
    I tried recreating the web extension and it is set to allow.

    This is what the log is showing:
    #Software: Microsoft Internet Information Services 6.0
    #Version: 1.0
    #Date: 2007-12-04 15:41:26
    #Fields: date time s-sitename s-computername s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent) cs(Cookie) cs(Referer) cs-host sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken
    2007-12-04 15:41:26 W3SVC1 WIN2K3R2SP2 GET /iisstart.htm – 80 – HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.2;+SV1;+.NET+CLR+1.1.4322) – – localhost 200 0 0 1708 369 1531
    2007-12-04 15:41:26 W3SVC1 WIN2K3R2SP2 GET /pagerror.gif – 80 – HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.2;+SV1;+.NET+CLR+1.1.4322) – http://localhost/ localhost 200 0 0 3032 356 0
    2007-12-04 15:41:32 W3SVC1 WIN2K3R2SP2 GET /index.php – 80 – HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.2;+SV1;+.NET+CLR+1.1.4322) – – localhost 404 0 0 186 291 2281
    2007-12-04 15:43:13 W3SVC1 WIN2K3R2SP2 GET /index.php – 80 – HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.2;+SV1;+.NET+CLR+1.1.4322) – – localhost 404 0 0 186 291 0
    2007-12-04 15:53:02 W3SVC1 WIN2K3R2SP2 GET /index.php – 80 – HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.2;+SV1;+.NET+CLR+1.1.4322) – – localhost 404 0 0 186 291 15

    I’ve set all user accounts on the c:\inetpub\wwwroot (yes I also used the default website) to have full control on the folder.

    Could you please advise what else I could do to have this up & running?


  73. 73 On December 5th, 2007, Paul Lynch said:


    A 404 is a standard file not found error message so I can only assume that IIS is not finding your index.php file where it thinks it is. The steps in the article *do* work and have been tested by many different people so I would suggest scrapping your current installation and starting again from scratch if you can.

    Paul Lynch

  74. 74 On December 6th, 2007, jacky_zz said:

    i have a question about install PHP. i download php for windows installer(MSI), and install it in my computer(Windows XP SP2), and integrated it with IIS. i create a php file use function phpinfo() to test it, success. but when i test it with mysql, it always report module not loaded.
    so, i search this problem in google, some article says what need to copy php5ts.dll, libmysql.dll and ext\php_mysql.dll to C:\Windows\System, and copy php.ini to C:\Windows, then restart IIS. i follow steps and do it, but not success. finally, i modify c:\Windows\php.ini, change extension_dir=”C:\php\ext” to extension_dir=”./”, restart IIS, it works!!!
    why?? then i look your article, i feel you point right way to me. and i follow your steps:
    1. add extension like “.php” into IIS’s default site -> “Application configuration” -> “Cache ISAPI Mappings”.
    2. modify system environment variable “Path”, concat PHP install path(C:\PHP) with it.
    3. add new system environment variable “PHPRC”, value is “C:\PHP”.
    4. modify c:\PHP\php.ini, change extension_dir=”./” to extension_dir=”c:\php\ext”.
    5. restart computer.
    6. create a php file with script “”, run it, IIS report 500 error. i’m pullzed!

    i hope you can give me some instructions to resolve it.


  75. 75 On December 6th, 2007, Ifti said:

    HI, Thank for such a clear tutorial, it really one of the best available at this time for Win 2k3.
    I need to enable GD library with PHP. need your help.

  76. 76 On December 10th, 2007, Advice for New and Power Users » Blog Archive » Hosting WordPress on your Windows Server 2003 said:

    […] Step 1 – PHP How To Install PHP on IIS 6.0 » IIS Admin Blog http://www.iisadmin.co.uk/?p=4 […]

  77. 77 On December 11th, 2007, Marshall Clark said:

    Hello, again! I am still attempting to install PHP. Thought I had it, but alas… I have a question inre install instructions, page 1, pasted below:

    Open the ‘php.ini’ file and find the line which reads extension_dir = “./” and change it to extension_dir = “C:\PHP\ext”. This tells PHP where the various extensions are located and as you can see the default path in the ‘php.ini-recommended’ file which ships with PHP points to the wrong location, so you need to change it.

    Where it says, “the default path…points to the wrong location, so you need to change it.”

    My question: Is this in reference to the extension_dir statement?

    If not, which php.in path statement requires changing?

    Please identify when you can and many thanks again.

    Marshall Clark

  78. 78 On December 12th, 2007, Sarah said:

    This guide is AWESOME!
    However I am hung up on ONE thing and that is the configuration file path. It still points to C:\Windows regardless of what I do. I didn’t move the php.ini file anywhere it’s still in the C:\PHP folder (which is where I changed the registry to point) then did a recyle of application pools – rebooted and still nothing. I am using it on a live site to test the phpinfo page pulls up fine but nothing changes with the Configuration File path – any tips???

  79. 79 On December 12th, 2007, Sarah said:

    I thought it might help if I add that this is in PHP Version 5.2.5 and there is an additional property shown in the info file that isn’t on your tutorial:

    Configuration File (php.ini) Path C:\WINDOWS
    Loaded Configuration File C:\PHP\php.ini

    So does this still mean I need to change the configuration file path?

  80. 80 On December 12th, 2007, Paul Lynch said:


    Yes you need to change the line in your php.ini file so that it reflects the actual location of the PHP extensions directory on your machine. So, if you have used C:\PHP as the path for your installation then you need to modify the extension_dir line in your php.ini file so that it reads extension_dir = “C:\PHP\ext”.

    Paul Lynch

  81. 81 On December 12th, 2007, Paul Lynch said:


    Yes, if your phpinfo file shows “Loaded Configuration File C:\PHP\php.ini” then your correct php.ini file is being used by PHP.

    Paul Lynch

  82. 82 On December 12th, 2007, Vijay Kadadi said:

    Yes its a very useful information to configure the php5.2 on win2003 server.i have one problem its sowing the error cannot load the mysql extensions ..pls check the php configuration.

  83. 83 On December 13th, 2007, Vijay Kadadi said:

    ok i got the solution when i create the normal text php file and run on IIS it shows the configration file in windows and loaded config file is none…then i copy the php.ini in windows directory and restart the IIS servive then it works properly.

  84. 84 On December 22nd, 2007, Imajr said:

    Thanks! My issue was that the path to “E:\program files\PHP\php5isapi.dll” in my application mappings was appearing in 8.3 format. I redirected using the format above and it started working.

  85. 85 On December 23rd, 2007, Adi said:


    I have a permission problem with fopen() in PHP, when I do a testing I get this error

    “The specified CGI application misbehaved by not returning a complete set of HTTP headers.”

    any idea ?

    We are running on IIS



  86. 86 On December 24th, 2007, Paul Lynch said:

    Hi Adi,

    That particular error message is notoriously difficult to diagnose I’m afraid. Try these KB articles :

    Errors may occur when you run CGI applications on a fast multi-processor computer that is running IIS 5.0 and IIS 6.0

    You receive a “The specified CGI application misbehaved” error message

    Paul Lynch

  87. 87 On January 2nd, 2008, David Tudor-Cole said:

    Hi Paul,

    I am going to give your excellent instructions a whirl – managed to install PHP4/MySQL/phpMyAdmin on IIS6/W2k3 in the past no problem but this PHP5 is not connecting showing that MySQL is installed and therefore I am not having any success getting phpMyAdmin to work. This is now urgent because I want to shift a few live sites from one server to a VM Server.

    Tried changing the PATH so that PHP was first in line, but no luck after a reboot.

    My next trick is to un-install (again) and start from scratch carefully following your most excellent instructions. I would really really appreciate your phpMyAdmin installation Tutorial because I will use this exclusively to move the database.

    Was hoping to complete this over the Christmas/New Year break but all good intentions.

    Anyway, the hols are over, Nil illegitimo in desperandum carborundum – but please: phpMyAdmin Tut 🙂

    Dave, New Zealand (ex Lancs).

  88. 88 On January 6th, 2008, Morris said:

    Good notes Paul,
    I installed using v5.25. My “swerver” got irritated with the 8.3 file name format as well. I’d add in the word “reboot” a few times. Windows isn’t happy unless it gets a 3-finger salute (real or virtual), you know…

  89. 89 On January 8th, 2008, Scott said:

    I can across a Video Tutorial that might help those of you like me that find visuals easier.


    I’m new to PHP. I was tempted to change my server to Linux but was getting more confused with Linux so I thought I’d try to figure out the Windows way for running Joomla.

    I hope this helps others as it did me.


  90. 90 On January 11th, 2008, Michael said:

    Hi all,
    If interested, I have put together a detailed step by step tutorial outlining how to install PHP (as well as other things) on IIS6 at http://www.videotutorialzone.com

  91. 91 On January 11th, 2008, Bryan said:

    Nice Tutorial

    I did all that and it will parse my .php files fine.
    However it with not parse the php code inside my .html files or will IIS 6 parse the html code that is embedded inside my .php files.

    this works on my hosted apache server.

    any way to make it work in this environment?

    2003 server r2
    IIS 6
    PHP 5.x


  92. 92 On January 15th, 2008, LnQ said:

    I you have you PHP installation here “C:\PHP\”

    You can add the PHPISAPI with this bat script

    cd \
    cd windows\system32
    cscript iisext.vbs /AddFile c:\PHP\php5isapi.dll 1 PHPISAPI 1 “PHP ISAPI Extension”

    open notepad put this in it and save it as “Add_PHPISAPI_extension.bat” with the quote and it will be saved as Add_PHPISAPI_extension.bat and not Add_PHPISAPI_extension.bat.txt

    Run the bat and tjeck IIS under “Web Service Extension” if “PHP ISAPI Extension” appear…

    Hope someone can use this in the future or something..

  93. 93 On January 15th, 2008, LnQ said:

    Thanks by the way…have followed a lot of guides but this one did the trick…will bookmark this site for future use…

    You can manuel point to the php.ini by running this reg


    Windows Registry Editor Version 5.00



    save as “something.reg” this is for php5

  94. 94 On January 19th, 2008, JPHASE said:

    Hey Paul, Amazing tutorial, thank you for being straight forward.

    Here’s my issue:

    Installing php5.2.5 (zip package) on Windows Server 2003/IIS6, and following the exact steps in your tutorial. The php -i in my command prompt works fine without all the dll errors I was getting with the msi installer before I found your tutorial. And, my php works if I browse to my .php file from the browser. However, when trying to access my .php files online through my dns, I get a 404 error.

    Of course this would lead me to believe that it’s my dns or my server, but here’s my problem:

    My documents are set with index.php first, and index.html second in the website’s properties and

    http://eventpromo.org – doesn’t work (404)
    http://eventpromo.org/index.html – does work?

    index.php is currently the typical phpinfo page that you included in your tutorial. However, when I browse to index.php locally with my browser (how I got the other .php pages to work), I get a blank page rather than any info about php??

    I suppose I’m missing something very easy and would greatly appreciate feedback as I’m sure you can relate with my frustrations in finding information online about this. Thank you very much!

  95. 95 On January 19th, 2008, JPHASE said:

    I forgot to include that I have the .php set to php5isapi.dll in the Application Configuration as well. Thanks in advance.

  96. 96 On January 21st, 2008, skyline said:

    I used the the latest Windows installer(5.2.5 MSI) and this guide. I ran into an issue stating “Invalid access to memory location” when loading any PHP page.

    The php.ini setting for session.path was set to the temp folder of the user that did the install. Obviously the Iusr account didn’t have access to that so, made a temp folder and granted the Iusr access to it. HTH soemone.

    Thanks for making this guide, it is a good reference

  97. 97 On February 1st, 2008, bluecat said:

    Very great and simple tutorial, all other I read before don’t work right. THX

  98. 98 On February 5th, 2008, Glenn Gervais said:

    This was fantastic. Very simple and to the point. Thank you very much!

  99. 99 On February 5th, 2008, How to Install PHP on IIS 6.0 | rabidGadfly said:

    […] For anyone looking for a PHP installation guide, I highly recommend checking out Paul’s tutorial. […]

  100. 100 On February 13th, 2008, Simon said:

    Marvellous 🙂

    MySQL posse make sure you’ve set your PHPRC environment variable – don’t ignore that bit cos it looks complicated. php 5.2.5 should give you this (where my php is here C:\php5\):
    Configuration File (php.ini) Path C:\WINDOWS
    Loaded Configuration File C:\php5\php.ini

  101. 101 On February 18th, 2008, Mick said:

    I was unable to serve up PHP from http://localhost in IE on a Server 2003 R2 latest SP’d 64 bit machine using IIS. Flipping IIS 6.0 to 32 bit mode didn’t work either. However using this guide with the 64 bit version of PHP at http://fusionxlan.com/PHPx64.php seems to be working so far. So many thanks to you for this guide and to the folks over at fusionxlan.com!

  102. 102 On February 20th, 2008, Ian said:

    How do you get e-mail working with PHP, my exchange box is on another server on my LAN which I point to in the PHP.ini file under

    [mail function]
    ; For Win32 only.
    smtp_port = 25

    However when trying to send an email via wordpress i.e. forgot your password I get the error

    The e-mail could not be sent.
    Possible reason: your host may have disabled the mail() function…

  103. 103 On February 20th, 2008, Paul Lynch said:


    I’m no expert when it comes to PHP’s mail function but you could try this :


    Paul Lynch

  104. 104 On February 22nd, 2008, Jason Greene said:

    Ran through the tutorial with PHP 5.2.5 and Win2K3. Everything worked like a charm, running the PHP INFO command loaded up fine in a browser.

    That is, until I set the PHPRC value (in my case to “C:\PHP”). Once I changed it, calling up the INFO page would result in a blank page. And when I deleted PHPRC (and rebooted the server), PHP services would return.

    Also tried the registry editing method… same result.

    Verified that permissions are set properly for both the C:\PHP directory as well as php.ini.

    Aside from a lack of directory tidyness, is there anything “bad” about running php.ini out of C:\windows?

  105. 105 On February 22nd, 2008, samir said:

    I am running windows xp professional. I have IIS 6.
    I do not see a section for the web server extensions.
    I also do not have any .vbs files in my windows\system32 directory that I can use to configure the server extensions.
    Does windows xp not have this feature installed?
    If so how can one go about installing it?

  106. 106 On February 23rd, 2008, Paul Lynch said:


    The version of IIS that ships with Windows XP Professional is actually IIS 5.1 – IIS 6.0 is only available with Windows Server 2003

    There are no web service extensions in IIS 5.1 – this was a new feature added in IIS 6.0

    Paul Lynch

  107. 107 On February 26th, 2008, Tina Amer said:


    I’m running PHP on IIS6 on my Laptop.
    Had problem with require Command to include files.
    I have made a Website on IIS and put some public PHP files for Include Out of WWW folder.
    When i want Include these files from inside of WWW folder by require Command [FAILED] rises.
    Web user has Permission to Access out of WWW .
    Please Help me.

    Tina Amer

  108. 108 On March 17th, 2008, Gene said:

    We have a client that is running PHP on IIS (Windows Server 2003). It is up and running fine. However, we are trying to create a test site on the same server but so far are only getting 404 errors.

    We created a new site under IIS. Copied the inetpub directory completely. Changed the host headers to differentiate the request. If you look at the properties of each site in IIS, I don’t see any differences (other than the headers just mentioned). I have it searching for index.php first. that is generating a 404. I do also have a test default.htm file there that is working if I fully specify the name via the URL. So I’m thinking it has to be something in the PHP configuration. Can you point me in the right direction?



  109. 109 On March 18th, 2008, Paul Lynch said:


    If you look in the IIS log files of your new site you will probably see that your requests for the index.php file are being met with a 404.2 status code which would indicate that the correct application mapping has not been configured.

    You can also get Internet Explorer to show you this information if you untick Show Friendly HTTP Errors in IE as described here :


    Paul Lynch

  110. 110 On March 19th, 2008, greg said:

    After attemting the installation a few times on my live productions server, I got to a point where my site was working but I cannot see the test index.php. I get the error:

    HTTP Error 401.3 – Unauthorized access is denied due to an ACL set on the requested resource.

    I have allowed all the users at least Read-Read/Write that I can find that are listed in the Application Pool. I can’t find any other ref. to permissions to change. I have tried all the different solutions like adding C:\PHP to the path, moving the .dll’s appropriately, adding permissions to the .dlls and to the entire directory (Both C:\PHP and C:\Windows\system32) and am stumped.

    Absolutely great walkthrough though…thanks very much.

  111. 111 On March 20th, 2008, greg said:

    I figured out the problem by running php from the command line and I got a browscap error that I had added to the php.ini. I commented that out and it worked…

    Thanks again for the great walkthrough!

  112. 112 On March 21st, 2008, Seo said:

    I think you are right greg.. Its a great walkthrough.

  113. 113 On March 28th, 2008, Server Move: Hosting My Own Site(s) - stevienova.com said:

    […] How to Install PHP on IIS 6.0How to Install MySQL On IIS 6.0How to Install WordPress on IIS 6.0 […]

  114. 114 On April 19th, 2008, Garry Freemyer said:

    I note that the second script you present for doing the mappings lacks a warning before it not to run this if you have existing mappings they will be destroyed.

    I followed this site step by step, I ran the script and THEN found the warning telling me that I have destroyed the mappings on my employer’s web site server.

    Please consider moving that warning above because now I’m stuck and I have no clue what the mappings were supposed to be.

    Sign me Heartache in California.

  115. 115 On April 19th, 2008, Paul Lynch said:


    I’m sorry to hear you had a problem with the steps in the article – I thought the warning about the effects of running the script was clear enough.

    You could try restoring your site’s metabase from a backup if you have one as documented here :




    Paul Lynch

  116. 116 On April 29th, 2008, antpedrolopes said:

    Congratulations, this site is amazing! is Unique!

    I had installed the PHP ISAPI Moduler (using php-5.2.5-win32-installer.msi version).
    This instalation set all kind of stuff, Set the environment variable to C:\Program Files\PHP, set the web service extension to point to c:\C:\Program Files\php\php5isapi.dll and allowed it, set in the home directory configuration properties to include the .php extension and that points to C:\Program Files\PHP\php5isapi.dll as well etc..
    When i try to execute localhost/index.php i get the error HTTP Error 404 – File or directory not found. I check the log and
    2008-04-29 17:14:43 GET /teste.php – 80 – Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.1;+.NET+CLR+2.0.50727;+InfoPath.1;+.NET+CLR+1.1.4322) 404 2 1260
    Please Help me.

    Thanks a lot
    António Lopes

  117. 117 On April 30th, 2008, Marvin Miller said:

    Paul, thank you VERY much for putting up this tutorial.

    I had been running on PHP 4.4.1 for about 5 years now – and an upgrade was long overdue. I used the Windows install files (Windows 2000/IIS 5) and my sites promptly disappeared. After a couple of hours of head scratching (while under the gun) I saw you mention is mis-compiled php5isapi.dll file that was still looking for php.ini in the C:\WINNT directory.

    Sure enough, I made the file you mentioned and it showed the issue clear as day. I implemented your solution by setting the PHPRC environment variable and re-started the server. Presto! All sites back up and running from the proper directories.

    Many, many thanks! In hindsight, it seems the Windows installer version of PHP worked just fine – except for that one problem. I looked on the PHP site for a way to tell them about it but couldn’t find one. It seems a shame that something so complex as a PHP release would be marred by such a simple error but I guess something always squeeks by.

    Mmmmmm…..last thing, I monitor page serve time very closely and upgrading from 4.4.1 to 5.2.5 resulted in a drop of about 75 milliseconds – a truly massive decrease. To give you an idea, I had previously seen a 75ms decrease by increasing my processor speeds from 2.0 Ghz to 2.8 Ghz – this time I got it for free 🙂

    Anyway, thanks again!

  118. 118 On April 30th, 2008, Paul Lynch said:

    Hi Marvin,

    Thanks for your comments. I appreciate the feedback 🙂

    If you are interested in squeezing every last drop of performance out of your PHP web sites on IIS then you might want to take a look at Microsoft’s FastCGI Extension for IIS, which you can get here :


    Paul Lynch

  119. 119 On April 30th, 2008, Marvin Miller said:

    Hi Paul;

    Looks like it’s only for IIS 6 🙁 Truth be told though, I don’t know much about this stuff. I suspect if someone knowledgeable went through the PHP code that powers my forums they could probably find a lot of ways to make it much faster. I was just shocked by the speed increase from the PHP upgrade – it’s easily as fast as new processors (in my case)

  120. 120 On May 14th, 2008, Rob said:

    I can view the phpinfo file fine, but I noticed that even after setting the PHPRC setting that my Configuration File (php.ini) Path is still set to C:\WINDOWS.

    Is there something I missed?

  121. 121 On May 21st, 2008, Rubén Ortiz » Phpmyadmin - 401.3 - Unauthorized said:

    […] http://www.iisadmin.co.uk/?p=4 […]

  122. 122 On June 3rd, 2008, Melissa A. said:

    When I try to access my index.php, which is *not* index.php.txt, it says that the page cannot be found. I set my website up to look in C:\Inetpub\wwwroot\test\, and that is where I have located index.php.

    I have already rebooted the server. When I try to access it via it’s IP address (which I gave it the IP address of the machine itself (it won’t let me change it to anything else, saying that it’s an invalid IP), it gives me a login prompt, and I enter my credentials, and it still doesn’t let me access it. I then tried using the weird IUSR_PHXWEBSERV1 and the password that was in that that it setup, but it still didn’t let me in.

    Under the properties of my test website, on the Home Directory tab, it has ticks in the boxes for Read, Log visits (where I find these, I have no idea…), and Index this resource. Application name says “Default Application”, starting point says “<test>”, Execute permissions says “Scripts and Executables”, and Application pool reads “DefaultAppPool.”

    The ASP.net tab is essentially blank.

    Even when I try http://test/index.php, it says internet explorer cannot display the webpage.

    I am very, very lost.


    thanks in advance, as if you’re reading this it usually means you at least read everything I had to say. 🙂


  123. 123 On June 4th, 2008, Paul Lynch said:


    Have a look at this comment and see if it helps any :



    Paul Lynch

  124. 124 On June 19th, 2008, rmartinez said:

    I did it the configuration as you indicated, everythings worked fine until I restarted the server. Then I always ger error 500 and the test.php doesn´t work anymore.

    Thanks in advance for your help!

  125. 125 On July 3rd, 2008, Emil said:

    Many thanks ! Finally a tutorial that said it right ! i just followed a couple of other tutorials and php was not working. Now everything works like a charm ! (i think the adding of the website extension was missing in those other tuts)

    Excellent job !


  126. 126 On July 8th, 2008, Dave said:

    Thank you so much for the guide – worked like a charm. In fact, there is a setup for the php at the page you point to that pretty much automates all this for you. I was able to verify all settings using your guide. Thanks!

  127. 127 On July 18th, 2008, Daniel said:

    Beautiful guide! Thanks alot!

  128. 128 On July 24th, 2008, Lewis said:

    Using PHP5
    This tutorial is very well written, however I’m stumped on my install.

    I’m getting the network login prompt when trying to access my .php page(s) via web browser. I checked IUSR permissions on c:\php and they are good. IWAM permissions are good also.

    I know it’s not a IUSR permission in IIS b/c I would get the login prompt when accessing the root of my site. In conclusion. html pages resolve fine, but .php pages prompt for network login on my Windows 2003 IIS6 server.

  129. 129 On July 26th, 2008, moe said:

    I launch the php.exe on my win2k3 machine and it just sits there and does nothing. so I am unable to get it to launch. any ideas? this is also a fresh install of php

  130. 130 On July 30th, 2008, SJM said:

    I followed the directions and when I run the script adsutil.vbs, I get –

    The path requested cannot be found
    ErrNumber: -2147024893
    Error trying to get to object: W3SCV/87257621/root

    When I try to access site(it is an interal ticketing system). I get –

    HTTP 500 – Internal server error
    Internet Explorer

    Please Help

  131. 131 On July 30th, 2008, Paul Lynch said:


    The web site ID I used in the walkthrough (SiteID 87257621) will not necessarily be the ID of the web site you are trying to configure. Look at your web site’s properties in IIS Manager to determine the appropriate ID for your web site and then substitute that ID for the one I used in the example. Hope this makes sense.

    Paul Lynch

  132. 132 On July 30th, 2008, Paul Lynch said:


    I’m not sure why you are trying to execute php.exe interactively – there is no call for it in this walkthrough.

    Paul Lynch

  133. 133 On July 30th, 2008, Paul Lynch said:

    @Lewis (http://www.iisadmin.co.uk/?p=4#comment-5267)

    If you enable full logging on your IIS web site you should see the error code IIS is returning to your browser and from there we should be able to see exactly which user/process is being denied access to which resource.

    Paul Lynch

  134. 134 On July 31st, 2008, Wordpress no IIS « using System.Reflection; said:

    […] Parte 1: How To Install PHP on IIS 6.0 […]

  135. 135 On August 6th, 2008, Marco said:

    Thanks a lot it work now with phprc but give result “no input file specified” solve very simple in php.ini flag the root_dir

    problem now with phpmyadmin…. it never end 🙁

  136. 136 On August 7th, 2008, markwilson.it » Installing PHP 5 on IIS 6 said:

    […] – for that reason you may prefer to use the ZIP file and perform a manual installation (as I did), following the instructions on the IIS Admin blog, which […]

  137. 137 On August 8th, 2008, Jared K. said:

    Just discovered the salvation to all my woes. Are you getting a 404.3 error? Read on…

    I followed every single tutorial I could get my hands on (including this excellent one by Paul). Everything looked to be setup correctly. All the file permissions were in place, the Environment variables were correct, the syntax looked good for file & directory locations.

    There was one wee little tiny thing that finally did the trick….setting a directory permission on the c:\PHP directory to allow “NETWORK SERVICES”. Give it read/write/execute permissions, and you’re all set.

    Crazy. I only found this by reading through literally hundreds of comments on various forums and tutorial sites. I hope this helps someone else!

  138. 138 On August 8th, 2008, Jared K. said:

    Oops…that should say “NETWORK SERVICE” (no plural).

    BTW, this change created a HUGE slowdown on my server. Still trying to figure that one out….

    Rescinding the permissions speeds everything back up to normal, but as soon as I add the permissions again, the site slows to a crawl.

    Any ideas?

  139. 139 On August 13th, 2008, EVGNick said:

    FANTASTIC faq, my friend!!!
    Got things up and running in about 10 minutes, now I’m coding away w/ no delays!!!

    Thank you kindly!

  140. 140 On August 28th, 2008, Installing PHP 5 on IIS 6 - Mark's Windows Server Blog said:

    […] – for that reason you may prefer to use the ZIP file and perform a manual installation (as I did), following the instructions on the IIS Admin blog, which […]

  141. 141 On September 3rd, 2008, chrisyeung168 said:

    does anyone know that php5.x got problem with win2003?
    see that bug report
    til from now, it is still no solution for it
    anyone got idea for how to fix it?

  142. 142 On September 12th, 2008, Zahid said:

    Excellent Yar

  143. 143 On September 19th, 2008, fennek said:

    If you don’t like adding the php isapi filter to “Web services extensions” and you are using the “isapi Filters” under “domain” -> properties, remember to allow Unknow ISAPI filters under “Web services extensions”

    dont’ ask me why i don’t like adding the php isapi filter to “Web sercices extensions” 🙂

  144. 144 On September 20th, 2008, Paul Lynch said:

    Actually, that’s really bad advice and I’d encourage people NOT to allow All Unknown ISAPI Extensions on their servers – it poses a security risk and shouldn’t be done. You even get a warning to this effect from IIS when you try do this.

    Paul Lynch

  145. 145 On September 24th, 2008, Gord said:

    401.3 Error is caused by permission issue on the PHP folder. You need to give “iusr_machinename” permission and “Allow inheritable permisssions from the parent” under the advanced tab.

    This was the case with Version 5.2.6 and Win2K3 SP2

    Hope this relieves some stress for someone else…


  146. 146 On October 14th, 2008, Michael Tobisch said:


    I followed all the steps to install PHP 5.2.6 on IIS 6.0 worked fine up to the last step. So I followed all the tips here concerning the 404 errors – still I have it. My Log files say:

    … GET /index.php – 80 – … servername 404 3 50 1791 620 109
    … GET /index.php – 80 – … servername 404 3 0 1791 461 15
    … GET /index.php – 80 – … servername 404 3 0 1791 461 15
    … GET /index.php – 80 – … servername 404 3 0 1791 461 0
    … GET /index.php – 80 – … servername 404 3 0 1791 461 0

    Any help would be appreciated…


  147. 147 On October 15th, 2008, Paul Lynch said:


    A 404.3 status code means “MIME map policy prevents this request”. Check that you have enabled the script mapping for PHP files on your web site.


  148. 148 On October 15th, 2008, Michael Tobisch said:


    the script mapping for PHP is enabled. The “Application Configuration” dialogue looks like this:

    [x] Cache ISAPI extensions

    Extension | Application Pool | Verbs
    *.php | C:\PHP\php5isapi.dll | All

    Any other idea? – The website is running on a virtual server. I want PHP only on that one, just for a single application. Do I have to change something in the “root” (“Web Sites”) properties as well (script mapping)?


  149. 149 On October 15th, 2008, Michael Tobisch said:

    Paul, got it running by defining the script mapping at the top level of IIS. Then I removed it from there, and re-added it to the virtual server, using the GUI. Then I removed everything else from there… And now it works…

    Thanks for your help

  150. 150 On October 28th, 2008, brainlitter.com said:

    Planning on installing PHP and/or MySQL on IIS?…

    Man, what an ugly install PHP and MySQL are. The documentati ……

  151. 151 On November 5th, 2008, Bryan said:

    Hello there,
    I am new so please forgive me if I am asking this in the wrong place. I have installed IIS6 and PHP. When I goto the root web folder, the default document (index.php) is run but if I go to ‘http://rootfolder/index.php’ I get the error message ‘No input file specified.’ Please can you help or advise where to look? Many thanks in advance.

  152. 152 On November 7th, 2008, Welcome - FatFrame.com said:

    […] actually publish useful content. First of all I wold like to thank the author of these tutorials: http://www.iisadmin.co.uk/?p=4 http://www.iisadmin.co.uk/?p=5 http://www.iisadmin.co.uk/?p=6 These articles helped me get this […]

  153. 153 On November 18th, 2008, Installing PHP on IIS6 « Jeff Douglas - Technology, Coding and Bears… OH MY! said:

    […] Here’s the link to the tutorial: http://www.iisadmin.co.uk/?p=4 […]

  154. 154 On November 28th, 2008, Chris said:

    Thanks for going through the painstaking detail that you have. Not sure if anyone else would like this, but I notice that no other site includes the possible ‘what could go wrong’ scenarios – it’d be nice to see.

    I followed your notes, and when I launch my php site, I’m getting 500 Error. Such a generic error, not sure what the issue is.

    I have Windows 2003 R2 w/SP2, I’ve created both a new website and a virtual directory off of the Default Web Site. I’ve created and allowed the php5isapi.dll in the application configuration (tried GUI as well as the .vbs)

    Permissions are WIDE open.

    Suggestions would be great. I’m running my OWA on that site, so it’s not as simple as wiping and reloading the server – not sure where conflicts might be coming from.


  155. 155 On November 28th, 2008, Paul Lynch said:


    That’s a good suggestion, I’ll have a think about putting together a troubleshooting article.

    Now, back to your problem. You say that permisions on your machine are ‘wide open’ – that in itself is not a good thing, but equally, we have no way of knowing whether your installation is experiencing a permissions issue.

    To try and unpick this problem I’d suggest you try running Filemon (http://technet.microsoft.com/en-us/sysinternals/bb896642.aspx) on your server when you try to access a PHP file. This should reveal any permissions deficiencies if they exist.

    My guess is that either your application pool identity or your authenticated web user account (including the IUSR account) has not got sufficient permission to read either your PHP content or your PHP installation folder (where php5isapi.dll resides)

    If you do manage to fix this issue using Filemon please let me know and I’ll include this issue as the first in a troubleshooting IIS/PHP series.


  156. 156 On January 28th, 2009, Gnorthern Gnome said:

    Have been recieving the 404 error since trying to upgrad PHP. Been round and round, found some very useful tips here and it just reaffirmed I was doing it all correctly. Thanks! However, haven’t read through every comment here as I fixed it by making sure that not only was PHP a Web Service Extension in IIS (thanks to you guys for making me check :)) but that is was also ENABLED! Somehow managed to disable it :S

    Anyway just thought I’d post it up, I was at the end of my tether trying to work this out ^_^

  157. 157 On January 29th, 2009, Jan C. de Graaf said:


    Thanks for this guide! It sure helped me setup PHP 5.2.8 on my W2003 server. Some steps did not go exactly as you described but I still managed to get it working. I have to install a 2nd W2003 machine. While doing that I’ll post here my findings; the parts that needed just a little twisting.


    p.s. Now I’ll look for your MySql guide:)

  158. 158 On February 12th, 2009, Guru said:

    I want to install PHP on my home machine. I have Windows XP and IIS 6.0. I followed the instructions but I am still unable to configure PHP. In fact, I am unable to create the new IIS connection. Please help!!! Mail your replies to me at testing_guru @ indiatimes.com. Thanks.

  159. 159 On April 21st, 2009, eric said:

    much appreciated. i was testing at work with IIS and installed about 20 times with failure until i found your guide..

    thanks !

  160. 160 On May 20th, 2009, Jan said:

    Thanks so much – this really help.

  161. 161 On May 23rd, 2009, Angelo Olivier said:

    Thank you, this finally solved my problem. Very well explained. Kind regards from Belgium.

  162. 162 On May 27th, 2009, Vincent said:

    Thanks for the mostly easy to follow instructions. The place where your instructions really fell down was at the adsutil.vbs part.

    cscript adsutil.vbs set W3SVC/87257621/root/Scriptmaps “.php,C:\PHP\php5isapi.dll,5″

    When I tried to run your command line code I got an error saying that W3SVC was not found.

    I was able to manually add the php script mapping however without any problems. At least once I found where to do it. You mentioned that I could do it manually in the “MMC GUI”. Huh? That’s where you lost me. Where is this MMC GUI?

    Luckily I accidentally stubled upon it. So for anyone else who wants to know how to simply do this manually this is how:
    1. Right click on your website in IIS and choose Properties.
    2. Go to the “Home Directory” tab
    3. Click the “Configure” button next to the “Starting point”

    Now you’re at Application Configuration window that matches the screenshot as posted in the tutorial.

    Hopefully this saves somebody else some time.

  163. 163 On June 29th, 2009, Manuel said:

    I wanted to write to you and thank you for this. I am new to PHP and it made my life a lot easier.

  164. 164 On July 18th, 2009, Max said:

    Finally a tutorial regarding this issue that really helped me. I usually use Apache as a web server, but this time I was forced to use two web server on the same machine simultaneously.

    Thanks a bunch!

  165. 165 On July 18th, 2009, Omar Shan said:

    Thanks for putting this. It seemed like a nightmare when I was using the tutorial at the other websites. This one was so simple to understand and implement..

    Thanku again. It was nice to see that PHPInfo file working finally

  166. 166 On July 28th, 2009, Irritated with PHP guy said:

    OK I have tried 1782633463548901247489578397589473568947389 differnt ways to make PHP work on my server. It flat will not!!!

    Every method I have tried including this one results in it asking me if I want to open, save ,cancel this file. If I click open it just goes back to the same.

    I tried thousands of variations, and eventually got it to tell me that I’m missing OCI.dll, sqlite3.dll, and some other I can’t find.
    I found them and put them everywhere. PHP folder, extentions folder, windows folder, system folder, system32 folder. Now I get…
    the procedure entry point ocilobread2 could not be located in the dynamic link library OCI.dll
    Since I don’t have Oracle as a database and don’t want to go through 20 kinds of hell to install that just to have PHP still not work I’m about to give up!

    Does anybody have a real solution on how to install PHP on windows server 2003 with IIS6 that really works without having to have your picture taken by the hubbel telescope??

  167. 167 On September 4th, 2009, konny said:

    I’ve installed php 5.2 and iis 6 and done everything in iis manager that php requires, but when opening my .php page in firefox i get download window and nothing happens

  168. 168 On September 24th, 2009, Sasa said:

    Have any one tried to run web services in IIS and PHP?

  169. 169 On October 15th, 2009, Neil Patmore said:

    Thanks for this. I only have MS servers so this is a great help.

  170. 170 On October 28th, 2009, Jose T said:

    Thanks so much for the instruction, very detailed yet easy.

  171. 171 On November 1st, 2009, WordPress on 64bit IIS6 « Chris J Owen said:

    […] Well it turns out that php and IIS play quite nice together, and have done for some time now. This is also a fairly well written about setup process see: http://www.iisadmin.co.uk/?p=4. […]

  172. 172 On November 15th, 2009, Ichi Trawinski said:

    On IIS 7 i’ve tried evvvvvvverything i could find for 4 hours and the same thing happens.. all my other web sites work fine. this one with the ISAPI filter pointing to c:\PHP\php5isapi.dll. goves a 500 trying to directory browse, get static HTML back and a .php calling the info commnd. i’d give anyone $50 to spend 10 minutes explaining to me how it was fixed.
    Rich at RJTConsulting dot com

  173. 173 On December 15th, 2009, yaron said:

    1000 thanks, I’ve been trying to install php in the last 4 hours and no luck. I followed your guide step by step and it worked like a charm.



  174. 174 On December 17th, 2009, Another PHP developer said:

    Unfortunately, PHP ISAPI is no longer supported and the ISAPI DLL will be removed from PHP distributions sometime in the future. FastCGI is now the *in* thing. Adding FastCGI layer between PHP and IIS is like adding twin turbos to a VW beetle. Here is the installation procedure for those who are interested:


  175. 175 On January 6th, 2010, Daniel M said:

    I get this error when running the cscript iisext.vb /AddFile step…

    Input Error: Can not find script file “C:\WINDOWS\system32\iisext.vbs”.

    So, I ran a search on my computer for the file “iisext.vbs” and it is nowhere. Help?

  176. 176 On January 6th, 2010, Paul Lynch said:

    @ Daniel M,

    Which version of Windows are you using ? If you are using Windows 2000 or Windows XP then you won’t find iisext.vbs, since this vbscript file is used to configure web service extensions and they didn’t exist in IIS versions prior to IIS 6.0


    Paul Lynch

  177. 177 On January 9th, 2010, Pablo Viale » Blog Archive » Wordpress en IIS te da el error 404 Page not found said:

    […] a Google y encuentro muchos artículos como este, este, y este otro, y verifico que ya hice todo correctamente. Sigue pasando lo mismo, el mismo error, The page cannot […]

  178. 178 On January 13th, 2010, Nalin Talwar said:

    The guide is excellent. It really saved a lot of time and effort. Thanks a million. Keep up the good work and do updated for the newer versions of PHP also.


  179. 179 On January 14th, 2010, PHP with mySQL - bidorbuy.co.za Forum said:

    […] Try these links for setting up PHP on an IIS system PHP: Installation on Windows systems – Manual How To Install PHP on IIS 6.0 IIS Admin Blog Installing PHP on Windows and IIS | David’s Technical Musings Installing PHP 5 on IIS in 5 […]

  180. 180 On January 15th, 2010, Jordan said:

    PHP doesn’t work for me.
    I am not any good with php but I found that the tutorial is useful and easy to follow. Thanks for posting.

    Also, although I followed exactly whit the tutorial but when testing PHP – it didn’t work. However, I didn’t use the cmd line where it said adding “php5isapi.dll to the extension”, cmd output telling me that the required .vbs file isn’t exist. What happend? Why isn’t it there?

    Despite that, I manually add the .php to the iis manager so i think that will fix. However when I browse a site that has php embedded it gave me the following:
    “You do not have permission to view this directory or page due to the ACL that is configured for this resource on the Web server”
    and also, testing the index.php still isn’t working yet.

    Can anyone see what is the error problem that causing me?

    Your support are greatly appreciated.

  181. 181 On February 5th, 2010, Victor Valdez said:

    Very nice article!
    It helped me a lot!

    Thanks from Mexico.

  182. 182 On March 2nd, 2010, Nirmal Soundarrajan said:

    Thank you so much mite, it works simply great. I had a bit of trouble while doing the installation on the first time, but i got it working right now. Thanks once again dude, you are a legend.

    All the Best…

  183. 183 On March 12th, 2010, dariusz grabka » PHP on IIS said:

    […] especially if you’re working with an older set of servers (like Windows XP + IIS 5).  A detailed IIS 6 walkthrough can be found on the IIS Admin […]

  184. 184 On March 16th, 2010, Ajnabii said:

    You probably need to enclose your path in quotes as it contains spaces.

  185. 185 On March 26th, 2010, Fernando said:

    Hello for work reasons I need to migrate from Apache to IIS 6 on win2003 and from Mysql to Oracle 9, well the last I did without problems and the first thing is what is giving me a headache, and your tutorial and made that the PHP pages was recognized by IIS, but on seeing the extensions that have activities in the phpinfo, not appears the OCI8 extension that I use to connect and Oracle, I modified the php.ini but is not displayed, I enable another extension like Mysql but neither case appears.

    Please, if someone pass from something similar, give me a hand to solve this, in my work are trying to kill me: S


  186. 186 On March 27th, 2010, Rudy said:

    Hi Paul,

    Firt of all, GREAT post. The best I have seen regarding installing and configuring PHP for IIS.

    I have installed PHP and everything is working ALMOST perfectly. Here is my problem.

    I have a script that I have been trying to run on my W2K3 server which uses php. The very first page of that script that allows me to login in and make some configuration changes has always returned a blank page. (When it calls php includes it stops and returns empty body tags)

    Now my php info page shows my configuration file path is C:\Windows. If I add the system variable PHPRC and set it to C:\PHP, this allows me to see my scripts login page, but then my php info test (test.php) returns a blank page.

    Something’s not quite right here. I want to go on to install MYSQL and MyPHPAdmin, but dont want to add more varibles to my problem. I would like to get the PHP install sorted out and working properly first.

    So why do you think that without adding the PHPRC system variable, test.php displays ok (with the config path pointing to c:\windows) but other scripts dont run and just return a blank page; but adding the variable allows other scripts to run (partially) but the test.php returns a blank page.

    I am using W2K3 with IIS 6.0 and shared IP addresses with host headers. I have no problem accessing the different sites. No MySQL or PHPMyAdmin have been installed yet.

    Once again, thank you for the great posts!

  187. 187 On March 28th, 2010, Rudy said:

    Just to follow up on my previous post,

    I have managed to get phpinfo to display as it should, the reason it wasnt displaying properly was because I was using an improperly formated tag. I was using
    and not . The first was incorrect.

    When I view my test page this is what is displayed:

    Configuration File (php.ini) Path C:\WINDOWS
    Loaded Configuration File C:\PHP\php.ini

    I suspect the reason my pre-packed script wont run is because its not finding the right configuration file. I have no idea really. Just guessing 🙂

  188. 188 On April 29th, 2010, Christian said:

    I tried to follow these (and similar instructions) but i always get stuck at the mentioning of php5isapi.dll because i don’t have this one on my Disc.
    i want to install PHP 5.3.2-nts in IIS6.0, windows 2003.

    any ideas?

  189. 189 On May 25th, 2010, Configuring WordPress on IIS6 « Wayne vs. Software said:

    […] I followed the superb instructions here – http://www.iisadmin.co.uk/?p=4 […]

  190. 190 On June 3rd, 2010, uni said:

    if you do this can you still run asp at the same time?

  191. 191 On June 7th, 2010, Dave said:

    Thanks for the guide! Even though the command line tools didn’t work for me on XP SP3 I was able to get it setup using MMC in the end.

  192. 192 On June 22nd, 2010, Tim said:

    Excellent Instructions

  193. 193 On July 19th, 2010, Rescue said:

    I am so impressed how easy this tut is. Thanks guys

  194. 194 On July 26th, 2010, Aman S. Aneja said:

    I did not got to know about the error which i recieve when i try to run the test website’s index.php or any other php file!

    All give the same error

    “14001 (0x000036b1)”

    nothin else is displayed on the page nor the description of this error

    Please Help

    using Windows Xp professional
    IIS 5.1
    php 5.3.0
    it has a file php5.dll

    Can you help me any way!

    Contact me asap…

  195. 195 On September 21st, 2010, tagit2.com said:

    How To Install PHP on IIS 6.0 » IIS Admin Blog…

    How To Install PHP on IIS 6.0…

  196. 196 On September 22nd, 2010, Esther said:

    Am not so firmiliar with IIS, however i have tried to follow the instructions submitted by david, they were really good and clear execept that after i had applied all the settings, when i attempted to connect to my website, i got an HTTP error 403.1
    “You have attempted to execute a CGI, ISAPI, from a directory that does not allow programmes to be executed”

    Any one firmilier with this error, Please help!

  197. 197 On October 10th, 2010, Ready to roll.- moxxo said:

    […] you are looking for a installation instruction: Install PHP on Windows Server / IIS Install MySQL on IIS How To Install WordPress […]

  198. 198 On October 12th, 2010, Paul said:

    I have followed the steps above and get an Internal Server Error 500. My question is we are running Server 2003 R2 x64 with IIS6. Does this make a diffence on the installation.

  199. 199 On October 22nd, 2010, Deepak said:

    I’m trying to add mapping with the following scenario. I’m working on a Dedicated Virtual Server which is having Plesk installed in it. And by default Plesk installed PHP5 in that. so I want to configure php to IIS with those extenstions. So when i’m trying to do mapping and its path is C:\Parallel\Plesk\admin\bin\php5isapi.dll.

    i am getting following error
    “You are not authorised to view this page”
    Please Help.

  200. 200 On October 26th, 2010, Php tutorial said:

    Easy and Clear tutorial. Thank you very much.

  201. 201 On November 3rd, 2010, muntasir said:

    i have ISS installed before but wanted php to be installed i have followed your guide. it worked but multiple http request crashes the php-cgi.exe.how can i fix it?

    IT support blog.

  202. 202 On December 9th, 2010, Brad said:

    Hi Paul,

    Many thanks, Fantastic post. The best I have seen regarding installing and configuring PHP and MySQL for IIS.
    I have installed everything as your instructions and it is working perfectly.

    Although I do have an issue with OWA and activesync that you may be able to help with.

    I am using SBS2003 on the IIS default web site.

    Before installing WordPress, PHP and MySQL, OWA and activesync were working fine. After installing WordPress, PHP and MySQL, both OWA and activesync will not accept the login credentials. Index.php and PHP are affecting the default home documents of the default web site, everything is run through index.php.

    To problem solve the issue, I have created two Home Directory folders for the default web site, one with the default setup (including default.htm, default.asp, index.htm, default.aspx) and the other with default setup AND the wordpress .php files. When I set the local path of the home directory to the folder that contains the .php files, our PHP web site functions perfectly BUT the OWA and activesync will not accept the login credentials. If I change the home directory to the folder that does NOT contains the .php files, OWA and activesync both function perfectly, but obviously our PHP web site does not function.

    Any suggestions?????

  203. 203 On December 10th, 2010, Paul Lynch said:

    Hi Brad,

    I’m not familiar with SBS so I haven’t tested the scenario you describe but it sounds like the default document for PHP is listed higher than the others and is effectively sending all traffic to your PHP web site instead of OWA, etc.

    Try putting your PHP site in its own virtual directory or maybe even just listing index.php lower down the list of default documents than the others.


    Paul Lynch

  204. 204 On January 25th, 2011, website design brisbane said:

    I tried to follow this and I was able to setup the php in the server. I am stuck with testing the php mail function. It has no error but does not send the email.

  205. 205 On January 27th, 2011, Jesus Zevallos said:

    Hi guys,

    I have a problem with my IIS over win2003, what is showing a stopped status for my default site where I have my OWA, originally installed and perfectly functioning, and my PHP5, installed before, problems began when I installed php the OWA interface began to fail, all directories are links. I reinstalled the OWA components and everything was fine, my web page http://www.mywebpage.com with php pages and the OWA on http://www.mywebpage.com/exhange, but two days before the IIS not response any more and when I try to start the IIS default site I get the message: the process cannot be started because it is taken by other process, I thinks that is because some windows update that changes some internal windows register; reviewing the port 80 it does not response even I kill all other process. Any ideas? must I reinstalled the OWA components? these two extensions can be over IIS at the same time?

    Thanks for your help.

  206. 206 On July 16th, 2011, Johndoe said:

    Just asking… I noticed that newer versions of PHP DO NOT HAVE THE isapi version but the nsapi version of the dll.
    will this affect the whole tutorial?

  207. 207 On July 17th, 2011, Paul Lynch said:


    I believe that support for the ISAPI module was dropped starting with PHP 5.3 so you should probably consider using FastCGI with IIS from now on.


    Paul Lynch

  208. 208 On August 9th, 2011, nemo said:

    Didn’t wade through the other comments above but, it would have been useful, for the uninitiated like me, if you had included the micro-documentation of:
    click on the web site
    rclick, properties
    click on Home Directory tab
    click on Configuration button

    and _then_ you get to see what you’re talking about with the Application Configuration window. I may be revealing my neophite qualities but, a few notes would have helped.

    Lest I clutter the overview with my tiny little complaint, I am grateful for the great work you’ve done here.

  209. 209 On September 3rd, 2011, Charles said:

    I created the website by using joomla and after I finished, the database was exported so as to have a copy of it, later this database was burned in my cd.
    Now the issue I want to host my website to the server OSS 2003 tnat should be running under ISS, what should I do?

  210. 210 On October 6th, 2011, Dave said:

    Excellent article 5 hours looking at the issue of permissions and missing temporary folder the php info suggestion above cut through all the nonsense and showed me what was wrong.

    WordPress can be a little uninformative on error message.


  211. 211 On July 5th, 2012, Mitsubishi Raider Parts said:

    My programmer is trying to persuade me to move to .
    net from PHP. I have always disliked the idea because
    of the expenses. But he’s tryiong none the less. I’ve been using Movable-type on a variety of websites for about a year and am nervous about switching to another platform. I have heard excellent things about blogengine.net. Is there a way I can import all my wordpress content into it? Any help would be really appreciated!

  212. 212 On December 29th, 2012, ABORE said:

    Good morning

    I have follow this step but

    after installed
    MySQL server(5.5.28) win32
    and PHP 5.4.10 VC9 x86 Non Thread Safe.

    I do these modification on the file
    php.ini-production after renamed php.ini
    I add the following lines:

    at this line: ;extension_dir = “./”
    I changed it to extension_dir = “C:\PHP\ext”

    I add again this variable environmental : ;C:\PHP

    I do this commande:
    C:\Windows\system32> cscript iisext.vbs /AddFile c:\PHP\php5isapi.dll 1 PHPISAPI 1 “PHP ISAPI”

    witch autorised php in the extension of IIS manager

    when i create in php

    those commandes php and pages are not knowned

    what can i do for my pho and mysql run on IIS server (window2003 server)
    best regards

  213. 213 On February 9th, 2016, Browser stays blank [ANSWERED] - Tech ABC to XYZ said:

    […] Just uninstalled the new version of PHP, which was 5.3.x Used the zipfile of an older 5.2.x version from php.net/releases and unzipped it to C:PHP I followed this tutorial http://www.iisadmin.co.uk/?p=4 […]

Leave a Reply

You must be logged in to post a comment.

  • Calendar

  • May 2018
    M T W T F S S
    « Sep