IT Nota

  • Home
  • How To
  • .NET
  • WordPress
  • Contact

How to Install PHP on Windows 10 Using Web Platform Installer

If you need to install a PHP on your local Windows machine with Internet Information Services (IIS), Microsoft has already provided a way where you can do it fairly quickly using WPI.

Keep in mind though, this setup has not been tested for production environment. So only use it as a PHP development environment for Windows.

Steps

  1. Open Control Panel -> Programs and Features -> Turn Windows features on or off. Under Internet Information Services -> World Wide Web Services -> Application Development Features, make sure that option CGI is checked. This enables both the CGI and FastCGI services.

    Control Panel CGI

  2. Download Web Platform Installer. For this example for Windows 10 64-bit, it’s the WebPI 5.0 x64.

  3. Double-click on WebPlatformInstaller_amd64_en-US.msi to install it.

  4. Once installed, you should see a file with the name wpilauncher.exe. Double-click it.

  5. When you see the Window, click on the Products link and search for “php” and press ENTER.

    Web Platform Installer 5.0 Product Search for PHP

  6. Add PHP 7.0.9 (x64) (or later version if available) as an item to install. Selecting this will automatically add Windows Cache Extension and PHP Manager for IIS.

    Web Platform Installer 5.0 PHP Installation

  7. (Optional) If you need to connect to SQL Server using PHP, you need to install Microsoft Drivers 4.0 (x64) for PHP v7.0 for SQL Server in IIS.

  8. Click on Install button.

    Web Platform Installer 5.0 Prerequisites Agreement

The downside of this installation is probably WPI may have a mind on its own and install other components that you didn’t choose as shown below:

Web Platform Installer 5.0 Installation Summary

If you see a failed installation for PHP Manager for IIS like above, don’t worry about it. That component is only used to provide a GUI for managing PHP from IIS. You can still use the command line and text editor to make configuration changes.

As always you can always test your PHP installation by creating a test.php file with this PHP code.

<?php phpinfo(); ?>

And run it from your browser (i.e., http://localhost/test.php). If PHP is installed correctly, you will see something similar to this:

phpinfo 7.0.9 displayed on a page

You may notice that the version of PHP installed using WPI is usually several versions behind the release version. Fortunately, you can always download PHP for Windows yourself and upgrade your PHP installation on Windows to a newer version with just a few additional steps explained on this post.

Further Reading

How to Upgrade to PHP 7.1 on Windows 10
How to Upgrade from PHP 7.1 to PHP 7.2 on IIS (Windows 10)
How to Activate Built-in Web Server
FastCGI
Using FastCGI to Host PHP Applications on IIS 7

Download

Web Platform Installer Direct Downloads

December 30, 2016 Filed Under: How To Tagged With: IIS, Internet Information Services, Microsoft, PHP, Windows, Windows 10

How to Manage IIS Servers Remotely

Managing several IIS servers can be overwhelming if you have to RDP to each server to perform your tasks. Unfortunately, there are many IT professionals still doing it the hard way by not taking advantage of this capability to manage IIS servers from their workstations.

Using IIS Manager for Remote Administration, you can manage remote IIS with the same experience as if you’re logged into the remote server since it has the same user interface.

As this setup is done on the client side where it will be used to manage the IIS servers from, make sure the remote server has its remote connections enabled under IIS Management Service (WMSVC).

After the remote server is properly configured, here are the steps to enable your workstation to manage remote IIS servers:

Steps

  1. Download IIS Manager for Remote Administration.

    For a 64-bit OS, use the inetmgr_amd64_en-US.msi. The word ‘amd’ on amd64 has nothing to do with whether you are using Intel or AMD processor.

    IIS Manager Download Dialog Box

  2. The first time you run it, you may see a dialog box with the following error:

    The IIS Management Console is not installed, but it is required for managing remote IIS Servers. Please install the IIS Management Console before installing the remote management support by opening the 'Control Panel-&amp;gt;Programs-&amp;gt;Turn Windows Features On or Off' and selecting the IIS Management Console in the Inet... [OK]
    

    IIS Remote Administration Error

    If that’s the case, just click OK and install the IIS Management Console first before you continue.

  3. Run the inetmgr_amd64_en-US.msi (substitute this with the file you downloaded if different) and just follow the instructions until the end.

  4. You can find the Internet Information Services (IIS) Manager under Control Panel and Administrative Tools.

  5. If you did not install IIS Remote Administration, IIS Manager can only be used to manage the IIS on your local PC. Remote Administration gives you an additional ability to connect to a different server (Connect to a Server…) as shown below:

    IIS Manager Connect Remote Server

The IIS Manager for Remote Administration 1.2 (inetmgr_amd64_en-US.msi) works on the 64-bit version of Windows 10, although it’s not mentioned in its System Requirements.

Downloads

IIS Manager for Remote Administration 1.2
IIS Manager for Remote Administration 1.2 Direct Download

Further Reading

How to Manage IIS Servers Remotely with WMSVC
How to Install IIS Management Console on Windows
How to Backup IIS Manager Connections List on Windows

December 16, 2016 Filed Under: How To Tagged With: IIS, Internet Information Services, Microsoft, Windows 10

How to Install IIS Management Console on Windows

Here are the steps to install IIS Management Console as a prerequisite to manage IIS servers remotely. The examples are shown using Microsoft Windows 10 Pro 64-bit.

Steps

  1. Make sure you don’t have any RDP sessions opened during installation otherwise you will see an error.

  2. Right-click the Windows Start Button, and click on Control Panel.

    Control Panel from Windows Start button

  3. Click on Programs.

    Program selection from Control Panel

  4. Click on Turn Windows features on or off.

    Turn Features On or Off selection in Control Panel (Programs)

  5. Find and expand Internet Information Services, then Web Management Tools and check on IIS Management Console.

    IIS Web Management Tools Console

    Click OK and Close when completed.

  6. Now go back to Control Panel and change the View by Category to Small icons. And click on Administrative Tools.

    Control Panel Small Icons View

  7. You should see Internet Information Services (IIS) Manager shortcut now.

    Administrative Tools IIS Manager

  8. Or you can click on Windows Start Button and click on All apps and find Internet Information Services (IIS) Manager under Windows Administrative Tools

    Apps Windows Administrative Tools IIS Manager

That’s it. Keep in mind that completing these steps only enables IIS Manager Console manage your local IIS. To also manage IIS servers remotely using this same interface, you still need to install IIS Manager for Remote Administration on your PC.

Further Reading

How to Manage IIS Servers Remotely with WMSVC
How to Manage IIS Servers Remotely

December 16, 2016 Filed Under: How To Tagged With: IIS, Internet Information Services, Microsoft, Windows 10

How to Cache Specific Static Files and Directories on IIS

As part of IIS performance tuning to improve a web page load speed, in general you want to enable browser caching by double-clicking on HTTP Response Headers in IIS Manager, click on Set Common Headers and check the Expire Web content:, then set the After: with an x number of days.

IIS HTTP Response  Headers to Cache Static Files

Often times though, you may want to be more granular in IIS static content caching for different type of files or all static files under certain folders. In the same way that you can disable browser caching for specific files on IIS, you can also configure the web.config to setup browser caching for specific files or directories with different lengths of time.

<configuration>
...
  <location path="favicon.ico">
    <system.webServer>
      <staticContent>
        <clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00" />
      </staticContent>
    </system.webServer>
  </location>
  <location path="js">
    <system.webServer>
      <staticContent>
        <clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="60.00:00:00" />
      </staticContent>
    </system.webServer>
  </location>
  <location path="images">
    <system.webServer>
      <staticContent>
        <clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="30.00:00:00" />
      </staticContent>
    </system.webServer>
  </location>
</configuration>

In this example we can see the caching for a specific file favicon.ico is set to 1 year (365 days) and two folders js and images are set to 60 and 30 days respectively (In a format of days.hours:minutes:seconds). This means, all static files under js folder will be cached for 60 days, similarly for images folder, although for less duration since the contents change more frequently.

By caching as many static files as possible on the browser, you can tremendously improve IIS performance, which translates to better users experience in loading your site faster on their subsequent visits.

Further Reading

Disable Browser Caching for Specific Files on IIS

June 17, 2016 Filed Under: How To Tagged With: IIS, Internet Information Services, Microsoft, Windows Server

How to Make Visual Studio Code Colorize Classic ASP Code

If you still have to do development with Classic ASP or VBScript and you want to use Visual Studio Code, you’ll soon find out that even though the code editor was built by Microsoft, there’s no language colorization support for ASP code by default. Fortunately, adding the feature can be done easily using Extensions. So here are the steps to do so:

  1. Launch Visual Studio Code and click on Go and select Go to File… or just press CTRL-P.

    Visual Studio Code Goto File

  2. On the dialog box, type in the following: ext install classic asp and press [ENTER].

    Another way to do it, you can just click on the Extensions icon (it should be the last one on the left-hand side (or press CTRL+SHIFT+X) and type in classic asp in the search box.

    Visual Studio Code Ext Install Classic ASP

  3. Select Classic ASP by Ilya Verbitskiy and click on the Install button as shown below:

    Visual Studio Code Extensions Marketplace for Classic ASP

  4. Once installed, we still have to associate the asp file extension to the newly ASP colorizer so we don’t have to manually select ASP as the language every time we open an ASP file. As it is now, Visual Studio Code still has no way to detect it as an ASP page so it will treat it as an HTML file.

    From the File menu, open Preferences and select Settings (CTRL + ,).

    Visual Studio Code Preferences Settings

  5. In Search settings box, type in “file associations” and you can either click on the Add Item button and populate the Item and Value (option 1), or you can click on link Edit in settings.json (option 2). In the older version of Visual Studio Code, only option 2 was available, but now if you only have a few entries, option 1 would be easier to do.

    Visual Studio Code Settings File Associations

  6. If you chose option 1, after adding the items, if you clicked on Edit in settings.json you should see the following:

    "files.associations": {
      "*.asp": "asp",
      "*.vbs": "asp",  // optional
      "*.inc": "asp"   // optional
    }
    

    Visual Studio Code file associations User Settings

    If you chose option 2 though, you have to add those in yourself.

  7. Save the file (CTRL-S) and close it.

That’s all there is to it, now you every time you open an asp file (or vbs script for that matter), the selected Language Mode will be set to ASP and any classic ASP code will be colorized accordingly.

This is not limited to ASP only, you can always look for any language of your choice by going to Visual Studio Marketplace.

Further Reading

Adding Language Colorization
How to Reassign Shortcut Key for Column Selection in Visual Studio Code

Download

Visual Studio Code
Classic ASP (Classic ASP Language Support) – Ilya Verbitskiy

June 3, 2016 Filed Under: How To Tagged With: Classic ASP, Code Editor, Microsoft, Visual Studio Code

« Previous Page
Next Page »
Buy me a coffee Support this site
Buy Me a Coffee?

Categories

  • .NET
  • Coding
  • Cybersecurity
  • Database
  • How To
  • Internet
  • Multimedia
  • Photography
  • Programming
  • Resources
  • Review
  • Tips and Tricks
  • Uncategorized
  • Use Case
  • WordPress
  • Writing

Recent Posts

  • How to Setup WordPress Installation on Linux
  • How to View Stored Procedure Code in SQL Server
  • How to Find a String in SQL Server Stored Procedures
  • How to Remove Cached Credentials without Rebooting Windows
  • ESP Work Automation: Empowering Enterprises with Streamlined Workflows and Operational Efficiency

Recent Posts

  • How to Setup WordPress Installation on Linux
  • How to View Stored Procedure Code in SQL Server
  • How to Find a String in SQL Server Stored Procedures
  • How to Remove Cached Credentials without Rebooting Windows
  • ESP Work Automation: Empowering Enterprises with Streamlined Workflows and Operational Efficiency

Tags

.NET .NET Core AdSense ASP.NET Cdonts Dll Classic ASP Code Editor ETL FSharp Genesis Framework Git Google HP Asset Manager HTML5 Hugo IIS Information Security Internet Internet Information Services iOS JAMStack Linux macOS Microsoft Microsoft SQL Server MVC PHP PowerShell Python Simple Mail Transfer Protocol Smtp Server SQL SQL Server SSIS SSMS SSRS Sublime Text Visual Studio Visual Studio Code VPN Windows Windows 8 Windows 10 Windows 2012 Windows Server

Copyright © 2011-2026 IT Nota. All rights reserved. Terms of Use | Privacy Policy | Disclosure