Code: Select all
To install PHP on IIS in Windows 11, download the appropriate PHP package from the PHP for Windows website, extract it, add the PHP directory to your system's PATH environment variable, and then configure IIS to use PHP as a handler for .php files.
Here's a more detailed breakdown:
1. Download and Extract PHP:
Go to the PHP for Windows download page.
Download the non-thread-safe version of PHP (recommended for IIS with FastCGI).
Extract the downloaded ZIP file to a location of your choice (e.g., C:\PHP).
2. Configure Environment Variables:
Open the System Properties window by searching for "environment variables" in the Start Menu.
Click "Advanced" and then "Environment Variables".
In the System variables section, find the "Path" variable and click "Edit".
Add the path to your PHP installation directory (e.g., C:\PHP) to the end of the Variable value, making sure to separate it with a semicolon (;).
3. Configure IIS Handler Mapping:
Open IIS Manager (search for "iis" in the Start Menu).
Select your server in the Connections pane and double-click "Handler Mappings".
Click "Add Module Mapping" in the Actions pane.
In the "Request path" field, enter *.php.
From the "Module" dropdown, select FastCgiModule.
In the "Executable" field, enter the full path to php-cgi.exe (e.g., C:\PHP\php-cgi.exe).
In the "Name" field, enter a descriptive name (e.g., FastCGI).
Click "OK".
https://github.com/phpmanager/phpmanager/releases