installphp.info


← Back to home page

Install PHP 8.0 on Server 2019

Warning! This PHP version is end-of-life!

PHP 8.0 reached end of life on 26 Nov 2023 and is no longer being updated. It's strongly recommended to upgrade to the latest version as soon as possible. You can read the official PHP migration guide here.

Installing PHP 8.0 on Server 2019

Prerequisites

  • Windows Server 2019 with latest updates installed
  • Administrator access to the server
  • Internet connection for downloading PHP
  • IIS (Internet Information Services) role installed

Installation

  1. Download PHP 8.0 for Windows from the official PHP website
  2. Extract the downloaded ZIP file to a directory (e.g., C:\PHP8)
  3. Rename php.ini-production to php.ini
  4. Edit php.ini and uncomment necessary extensions
  5. Add PHP directory to system PATH
  6. Install necessary Visual C++ Redistributable packages
  7. Configure IIS to handle PHP requests:
    • Open IIS Manager
    • Select 'Handler Mappings'
    • Add new module mapping for PHP
  8. Restart IIS

Verification

  1. Create a new file named phpinfo.php in your web root directory with the following content:
    <?php phpinfo(); ?>
  2. Open a web browser and navigate to http://localhost/phpinfo.php
  3. Verify that the PHP information page is displayed, showing version 8.0
  4. Check for any errors or warnings in the phpinfo output
  5. Test a simple PHP script to ensure proper functionality