How to Install PHP for Windows Internet Information Service (IIS)

Channel:
Subscribers:
14,400
Published on ● Video Link: https://www.youtube.com/watch?v=Dp47xjPS_ik



Category:
Guide
Duration: 4:02
6,421 views
91


#Windows #IIS #WebServer #PHP

Full steps can be found at https://i12bretro.github.io/tutorials/0770.html

--------------------------------------------------------------------
What is IIS (Internet Information Services)?
--------------------------------------------------------------------
Internet Information Services (IIS) for Windows® Server is a flexible, secure and manageable Web server for hosting anything on the Web. From media streaming to web applications, IIS's scalable and open architecture is ready to handle the most demanding tasks. - https://www.iis.net/
 
 
--------------------------------------------------------------------
What is PHP (PHP Hypertext Preprocessor)?
--------------------------------------------------------------------
A popular general-purpose scripting language that is especially suited to web development.
Fast, flexible and pragmatic, PHP powers everything from your blog to the most popular websites in the world. - https://www.php.net/
 
 
NOTE: This tutorial assumes IIS is already installed and running on the host. Check out this previous tutorial to find out how to install IIS  https://youtu.be/Gia2dmFrNxs
 
   01. Log into the Windows server with an account with admin privileges
   02. Download the Non-Thread Safe (NTS) VS16 x64 PHP for Windows .zip  https://windows.php.net/download/
   03. Download Microsoft Visual C++  https://aka.ms/vs/16/release/vc_redist.x64.exe
   04. Install Microsoft Visual C++
   05. Extract the downloaded PHP for Windows .zip file
   06. Rename the extracted folder PHP
   07. Cut the PHP folder to a safe location to run from, such as C:\Program Files
   08. Click the Start button ≫ Search Control ≫ Click Control Panel
   09. Click on System ≫ Advanced system settings
   10. Click the Environment Variables...
   11. Edit the System Path variable
   12. Click the New button
   13. Add the PHP installation directory (ie C:\Program Files\PHP\
   14. Click OK to all open dialog windows
   15. Launch Server Manager from the Start
   16. Click Add roles and features
   17. Click Next on the Before you begin screen
   18. Select Role-based or feature-based installation ≫ Next
   19. Leave Select a server from the server pool selected and select the current Windows server ≫ Next
   20. Expand Web Server (IIS) ≫ Expand Web Server ≫ Expand Application Development ≫ Check the box next to CGI to select it
   21. Click Next
   22. Click Next on the Select features screen
   23. Click Install on the confirmation screen
   24. Leave the installation progress screen open until the install completes
   25. Once the Feature installation completes successfully, click the Close button
   26. Back in Server Manager, click Tools ≫ Internet Information Services (IIS) Manager
   27. Click the server name to select it ≫ Double click Handler Mappings
   28. Click Add Module Mapping at the top right of the dialog
   29. Complete the Add Module Mapping form as follow
         Request Path: *.php
         Module: FastCGIModule
         Executable: C:\Program Files\PHP\php-cgi.exe
         Name: PHP
   30. Click OK
   31. Click Yes to confirm creating the FastCGI application
   32. Click the server name again to select it and return to the main options menu ≫ Double click Default Document
   33. Click Add... at the top right of the dialog
   34. Type index.php ≫ Click OK
   35. Right click on the server name ≫ Stop
   36. Right click on the server name again ≫ Start
   37. Expand the server name ≫ Expand sites ≫ Right click on Default web Site ≫ Select Explore
   38. A File Explorer window will display the wwwroot folder for IIS
   39. Right click in the whitespace ≫ New ≫ Text Document ≫ Name the new file phpinfo.php
   40. Edit phpinfo.php in Notepad and paste the following
         ≪?php
          phpinfo();
         ?≫
   41. Save the changes to phpinfo.php and close Notepad
   42. Open a web browser and navigate to http://DNSorIP/phpinfo.php
 


### Connect with me and others ###
★ Discord: https://discord.com/invite/EzenvmSHW8
★ Reddit: https://reddit.com/r/i12bretro
★ Twitter: https://twitter.com/i12bretro







Tags:
Home Lab
Home Lab Ideas
How To
How To Install PHP For IIS
How To Run PHP On IIS
Install Guide
Microsoft
Microsoft Windows
Microsoft Windows 2022
PHP
PHP Development
PHP For IIS On Windows Server
PHP Hypertext Preprocessor
PHP IIS Install Guide
PHP IIS Installation Guide
Self-Hosted
Server 2022
Tutorial
Web Developer
Web Development
Web Server
Web Server Administration
Windows
Windows 2022
Windows Administration
Windows Server
i12bretro