Windows Server 2008 and Windows Server 2003 are the current domestic mainstream server operating system, its build PHP environment is also a variety of, where iis+fastcgi+php+mysql installation is the simplest.
iis7.5 is installed in the Win7, Win8 Web server, Win2003, Win2000 Web server use is iis6.0, because Win7, win8 system compared to Win2003, Win2000 have a change of the new leather surface of the different, Therefore, the configuration of iis7.5 must be a turn to be familiar. However, these are operational things, such as the first contact with iis6.0, the operation of a few times slowly become familiar with.
Now I need the Web server to run the PHP program, so I want to configure the PHP environment. First thought easier, because in the iis6.0 has been configured countless times, the star outside the PHP fully automatic installation 30 seconds easy to fix, but when opened iis7.5, only then found that the original iis6.0 familiar things most in iis7.5 found, had to grope for a turn. This article, combined with its own practical experience, describes how to configure PHP in the iis7.5 installation.
1. Preparation of documents
First make sure you have downloaded and unzipped the PHP program file, and if not, download one first. PHP Program files are not required to install, the download of the compressed packets to any folder can be extracted. In this case, PHP 5.2.13 is used.
Download PHP executable file: http://windows.php.net/download/
2.IIS Configuration 2.1 Add ISAPI filter
Go to Control Panel-programs-turn on or off Windows features, expand Internet Information Services, check ISAPI filters, and then click OK, as shown in the following illustration:
Figure 1: Opening the ISAPI filter
2.2 Setting ISAPI2.2.1 to open IIS Manager
Go to IIS Manager (method: Right-click "Computer", click "Manage", expand the "Services and Applications" item in the pop-up interface, and double-click Internet Information Services (IIS) Manager) to enter the IIS management interface, as shown below.
Figure 2: Opening IIS Manager
2.2.2 Add a PHP ISAPI path
In Figure 2 above, double-click the icon for ISAPI and CGI restrictions, and then go to the setup screen, as shown below.
Figure 3: Adding the PHP ISAPI
As shown in Figure 3 above, click "Add", enter the PHP ISAPI path in the pop-up window, which is the Php5isapi.dll file path of the PHP extract package, fill in the description text, such as "PHP", check "Allow to execute extended path", then click "OK".
2.2.3 Add PHP handler mappings
Click on the computer name (correction: should be to click on the "website" below the need to set the name of the site, rather than the top of the computer name, this setting is for a certain site, you will see the right side of "IIS" under the "Handler mapping" icon, the following figure.
Figure 4:iis Handler Mapping
Double-click the "Handler mapping" icon to enter the Setup interface, as shown in the following figure:
Figure 5: Adding a PHP handler mapping
Click "Add script Map ..." In the Setup interface, and then fill in the corresponding content in the pop-up window, the request path is "*.php", the executable file is the Php5isapi.dll file path of the PHP decompression package, the same as the path of Figure 3. Name arbitrary, you can fill in the "PHP", request restrictions do not set, click "OK" added complete.
2.2.4 Test PHP
Enter the following lines of code in Notepad:
?
1 2 3 |
<?php phpinfo ();?> |
Save as: info.php, put in the site directory, and then start the browser, access to http://localhost/info.php, if you see the following screen to prove the installation was successful!
Figure 6:php Run Successful interface
The above mentioned is the entire content of this article, I hope you can enjoy.