We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

Installing PHP on IIS 8.0RSS

7 replies

Last post Jul 28, 2015 08:26 AM by mdurthaler

  • Installing PHP on IIS 8.0

    Oct 28, 2013 08:14 AM|PrashantKumar96|LINK

    Here is what my situation is:
    I have installed WebMatrix 3 from Web PI. From Web PI only when I try to download PHP 5.4.14 it stucks on 0. So I downloaded it manually. Now I have a PHP zip file (which I extracted at C:\PHP). I also have Visual Studio Express 2013 for Web. Visual Studio do not have PHP support (for free), WebMatrix has so I want to use Visual Studio for normal development and WebMatrix for PHP stuff. For PHP to run, I have to install it on IIS Express 8.0 that I got along with WebMatrix installation. What will be my steps to install PHP? Also, if you can help me with WebMatrix and Visual Studio problem then please suggest me something.

    php5 IISExpress8.0

  • Re: Installing PHP on IIS 8.0

    Oct 28, 2013 03:30 PM|HostingASPNet|LINK


    You could read the following guide - how to host PHP on Windows.


    php5 IISExpress8.0

    WindowsHostingASP.NET - My favourite site for Windows and IIS hosting information.
    HowtoASP.NET - Free ASP.NET tutorials and source code.
  • Re: Installing PHP on IIS 8.0

    Oct 29, 2013 02:22 AM|Angie xu - MSFT|LINK

    Hi Prashant

    We can activate IIS 8 in Windows 8 by using Turn Windows features on or off in Control Panel. And there are two way to install and configure PHP in Windows 8. First, we can install and configure PHP manually. Second, we can use Microsoft Web Platform Installer that can install and configure PHP automatically.

    Please refer 3 work in the section below :

     a. IIS 8 installation.

    b. Microsoft Web Platform Installer instalation.

    c. PHP installation and configuration with Microsoft Web Platform Installer.

    For reference: How to install and configure PHP on IIS 8 in Windows 8


    php5 IISExpress8.0

    Angie xu

    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue.
  • Re: Installing PHP on IIS 8.0

    Nov 09, 2013 01:09 AM|PrashantKumar96|LINK

    I have asked for IIS Express 8.0 not IIS 8.0 as IIS Express is used by WebMatrix.

    php5 IISExpress8.0

  • Re: Installing PHP on IIS 8.0

    May 23, 2014 07:36 AM|Jan Reilink|LINK

    For as far as I can see, there is no easy way to install and configure a custom PHP version with WebMatrix / IIS Express.

    You can set up PHP on your machine (for instance, follow http://www.saotn.org/php-54-wincache-on-iis-7-75-80/ to find out what to do with the .zip file), and according to http://stackoverflow.com/a/12946477/1297898 the applicationHost.config is located in %userprofile%\my documents\iisexpress\config\applicationhost.config (I just verified this). Following the documentation (http://www.iis.net/learn/extensions/introduction-to-iis-express/iis-80-express-readme) you can use Appcmd.exe.

    So perhaps you can piece the information together to install your own PHP with WebMatrix / IIS Express?

    I just might make a guide about this topic sometime this weekend :)


    php5 IISExpress8.0

    Vevida: https://vevida.com
    Sysadmins of the North: http://www.saotn.org
  • Re: Installing PHP on IIS 8.0

    Aug 19, 2014 05:11 AM|Jan Reilink|LINK

    I know this is an old thread/question. I finally took some time to describe how to install your custom PHP version with IIS Express and WebMatrix 3. You can find the how to here:


    Hope this helps.

    php5 webmatrix IISExpress8.0

    Vevida: https://vevida.com
    Sysadmins of the North: http://www.saotn.org
  • Re: Installing PHP on IIS 8.0

    Sep 23, 2014 02:22 AM|Kailashaghera|LINK

    I suggest you to install only PHP 5.4.x from WebPI. If you wish to install it manually I suggest you to use IIS instead of IIS Express.

    php5 IISExpress8.0

    Web Hosting Discussion - The web hosting community for Webmasters
    Web Hosting Blog - Web site and Server security
  • Re: Installing PHP on IIS 8.0

    Jul 28, 2015 08:26 AM|mdurthaler|LINK

    Angie, this is close to what I'm running into.  Since posting this I found a video at https://www.youtube.com/watch?v=FFUhsVGXbWA that explains some things.  I tried to run the basic project and the install of what's needed to update IIS failed.  So it seems it's an IIS issue, for the internal IIS in VS 2013, which is IIS 8.

    If the image insert actually worked I could provide the install error I'm getting.  I have it saved locally as a png file.

    However ... I want to learn how to fix this.  The JS code calling the PHP file and the content of the PHP file is included.

    I have VS 2013 and am browsing an aspx page in Chrome from it.  It uses IIS 8 internally in order to do this.  PHP Tools for VS is installed and activated for 30 days.  My guess is IIS 8 in VS 2013 didn't respect this.

    This JS method is calling a php file in the same directory where jQuery lives.  The php text follows it.  Note, I'm getting an error on the closing ?> 'XML document must contain a root level element' so the file is still being seen as something other than php.  It is obviously called json.php.

    My guess is the install of PHP tools was not respected by IIS in VS 2013.  Whatever the issue is, how can this be fixed?  Thanks! Mike

    <script type="text/javascript" >
    $(document).ready(function ()
    alert('in doc ready');
    type: 'GET'
    , url: 'json.php'
    , dataType: 'json'
    , success: 'showStates'
    , error: errorFunction
    // for 28 Jul ... why are we getting an error, also the statusMessage is blank.  We should get xhr, statusMessage, httpErrorCode from JS.
    function errorFunction(xhr, statusMessage, httpErrorCode)
    alert('An error was encountered ' + statusMessage);
    function showStates(data, status)
    alert('at show states');
    $each(data, function (item)
    alert('in the loop to get states');
    $('#states').append('div' + data[item] + '</div>');

    PHP File Contents:


    $states = array(
    "New York",
    "New Jersey",

    print json_encode($states);


    php5 IISExpress8.0