installphp.info


← Back to home page

Install PHP 7.1 on Server 2019

This version of PHP is actively supported.

Good news! PHP 7.1 is being actively supported through 21 Nov 2024. After that point, it's advisable to upgrade to the latest version, since the PHP team will only offer security-related support until 21 Nov 2024, at which point PHP 7.1 will be considered "end-of-life".

Installing PHP 7.1 on Server 2019

Prerequisites

  • Windows Server 2019 installed and updated
  • Administrative access to the server
  • Internet connection for downloading PHP
  • IIS (Internet Information Services) role installed

Installation

  1. Download PHP 7.1 from the official PHP website
  2. Extract the downloaded ZIP file to a folder (e.g., C:\PHP7.1)
  3. Copy php.ini-production to php.ini in the same folder
  4. Edit php.ini and uncomment necessary extensions
  5. Add the PHP installation directory to the system PATH
  6. Open IIS Manager and install the "CGI" feature if not already installed
  7. In IIS Manager, add a handler mapping for PHP
  8. Restart the IIS service

Verification

  1. Create a new file named info.php in the web root directory
  2. Add the following code to info.php:
    <?php phpinfo(); ?>
  3. Open a web browser and navigate to http://localhost/info.php
  4. Verify that the PHP information page is displayed correctly
  5. Check that the PHP version shown is 7.1.x