To install PHP Manager on Windows Server 2022, follow these steps:
Step 1: Install IIS (Internet Information Services)
- Open Server Manager.
- Click on Add roles and features.
- In the wizard, click Next until you reach the Server Roles section.
- Check Web Server (IIS) and click Next.
- Proceed through the wizard, ensuring to include necessary features, then click Install.
Step 2: Download PHP
- Visit the PHP for Windows site.
- Download the latest non-thread-safe version of PHP (zip file).
- Extract the downloaded zip file to a directory, e.g.,
C:\PHP
.
Step 3: Configure PHP in IIS
- Open IIS Manager.
- Click on your server name in the left pane.
- In the right pane, double-click on Handler Mappings.
- Click on Add Module Mapping.
- Request Path:
*.php
- Module:
FastCgiModule
- Executable:
C:\PHP\php-cgi.exe
(adjust the path if necessary) - Name:
PHP_via_FastCGI
- Request Path:
- Click OK, and then confirm when prompted.
Step 4: Install PHP Manager
- Download the PHP Manager for IIS from the official site.
- Run the installer and follow the prompts to complete the installation.
Step 5: Configure PHP Manager
- Open IIS Manager again.
- Click on your server name.
- You should see PHP Manager in the features view.
- Click on it to open and configure PHP settings, such as enabling extensions and managing PHP versions.
Step 6: Verify Installation
- Create a PHP file (e.g.,
info.php
) in your web root (e.g.,C:\inetpub\wwwroot
). - Add the following code:phpCopy
<?php phpinfo(); ?>
- Open a web browser and navigate to
http://localhost/info.php
. You should see the PHP information page.
Additional Configuration
- Ensure that the appropriate PHP extensions are enabled in PHP Manager.
- Configure your PHP settings in the
php.ini
file located in your PHP directory.
Following these steps should successfully install PHP Manager on your Windows Server 2022.
Installing PHP this way makes it much easier to install new version, run more than one version at a time and generally makes things easier.
Install PHP and PHP Manager on Windows Server 2022 – Easy way