Home >Backend Development >PHP Tutorial >Let IIS support PHP_PHP tutorial
I am learning this aspect myself. I just saw this configuration article and learned some things. I will post it and share it with everyone.
The built-in Internet Information Services (IIS) of Windows system has good support for ASP, so it is very convenient to debug ASP web pages in IIS. But some friends’ web pages use PHP programming technology. By default, IIS does not support PHP. Manually configuring the PHP debugging environment of IIS is very difficult for us novices. So how can I make IIS support PHP? Here is a method to configure the PHP debugging environment in IIS in just a few simple steps.
Installing the IIS component
The author takes IIS5.1 of the Windows XP system as an example. First, the IIS component must be installed. It is installed by default in the system. If it is not in your system yet, go to "Control Panel → Add or Remove Programs → Add/Remove Windows Components" and select the "Internet Information Services (IIS)" option in the "Windows Component Wizard" dialog box (Figure 1) , click the "Next" button to complete the installation of IIS components.
Figure 1 Install IIS components
Configure PHP debugging environment
Download the PHP installation program from "http://www.fyrose.com/php406.exe" to the local machine. Next we will use the PHP installation wizard Complete the configuration of the PHP debugging environment.
Figure 2 Select the Web server
Run the installation program of the PHP software package, click the "Next" button in the pop-up welcome window, then click the "I Agree" button in the "License Agreement" window, and then Select "Standard" installation in the Installation Type window, click the "Next" button, and specify the PHP installation directory. It is recommended to use the default installation directory. Then set the email address and specify the SMTP server in the "Mail configuration" window, and select the type of Web server you use in the "Server Type" window (Figure 2), because we use the IIS5 that comes with Windows XP system .1. Select the "Microsoft iis4 or higher" single option, click "Next" to start the installation, and finally select all sites in the "IIS Scriptmap Node selection" window (Figure 3), click the "OK" button, and you are done. Installation and configuration of PHP.
Figure 3 Select all sites
Check the PHP debugging environment configuration
Go to "Control Panel → Administrative Tools", run the Internet Information Service program, right-click "Default Website" and select "Properties" in the pop-up menu , then switch to the "Home Directory" tab in the pop-up properties dialog box, click the "Configuration" button in the application settings bar, the "Application Configuration" dialog box will pop up, and in the "Mapping" tab, view the application Check whether there is an option with the extension ".ph p" in the mapping list box (as shown in Figure 4). If it exists, it means that the PHP installation and configuration is successful.
Figure 4 View program mapping
If you do not find this option, you can also add it manually. Click the "Add" button in the application configuration dialog box to pop up the "Add/Edit Application Extension Mapping" dialog box (Figure 5). Enter the "php.exe" program path in the "Executable File" column, " Enter ".PHP" in "Extension", use the default settings for other options, and finally click the "OK" button.
Figure 5 Manually add mapping
This completes the configuration of the PHP debugging environment, and you can debug PHP files in IIS in the future.