install php on iis windows 11

Various changes to the Windows Operating System, also for the Intranet

Moderator: sjj1805

Post Reply
User avatar
sjj1805
Site Admin
Posts: 1202
Joined: Fri Oct 27, 2006 12:45 am
operating_system: Windows 10 Pro
motherboard: Hewlett Packard 2AF7
system_drive: C
32bit or 64bit: 64 Bit
processor: 2-90 gigahertz Intel Core i5 4460S
ram: 8 GB
video card: NVIDIA GeForce GT 705
sound card: P40D100-4 NVIDIA High Definition Audio
Hard_Drive_Capacity: 8 TB
Location: Birmingham UK
Contact:

install php on iis windows 11

Post by sjj1805 » Wed Apr 09, 2025 12:31 pm

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://windows.php.net/download/

https://github.com/phpmanager/phpmanager/releases

Post Reply