Home > Backend Development > PHP Tutorial > A brief analysis of iis7.5 installation and configuration of PHP environment_PHP tutorial

A brief analysis of iis7.5 installation and configuration of PHP environment_PHP tutorial

WBOY
Release: 2016-07-13 09:54:27
Original
869 people have browsed it

A brief analysis of iis7.5 installation and configuration PHP environment

Windows server 2008 and Windows server 2003 are currently the more mainstream server operating systems in China, and the environments for building PHP are also diverse. , among which IIS Fastcgi php mysql installation is the simplest.

iis7.5 is a web server installed in win7 and win8. The web server of win2003 and win2000 uses iis6.0. Since win7 and win8 systems have different aspects of reform compared to win2003 and win2000, so for The configuration of iis7.5 also needs to be fiddled with before you can become familiar with it. However, these are all operational things, just like the first time I came into contact with iis6.0. After operating it a few times, I gradually became familiar with it.

Now I need the web server to run the php program, so I need to configure the php environment. At first I thought it would be easier, because I have configured it countless times in iis6.0, and the fully automatic installation of Xingwai PHP can be easily done in 30 seconds. However, after opening iis7.5, I found that most of the familiar things in iis6.0 are in I couldn't find it in iis7.5, so I had to dig around. This article combines my own practical experience to introduce how to install and configure php in iis7.5.

 1. Prepare documents

First make sure you have downloaded and unzipped the php program file. If not, download one first. PHP program files do not need to be installed, just unzip the downloaded compressed package into any folder. In this case, PHP 5.2.13 is used.

Download the Php executable file from the official website: http://windows.php.net/download/

 2.IIS Configuration 2.1 Add ISAPI filter

Go to "Control Panel" - "Programs" - "Turn Windows features on or off", expand "Internet Information Services", then check "ISAPI Filter", and finally click the "OK" button, as shown in the figure below:

Figure 1: Open ISAPI filter

 2.2 Set up ISAPI2.2.1 and open IIS Manager

Enter IIS Manager (method: right-click "Computer", then click "Manage", expand the "Services and Applications" item in the pop-up interface, and then double-click "Internet Information Services (IIS) Manager"), Enter the IIS management interface, as shown below.

Figure 2: Open IIS Manager

 2.2.2 Add PHP ISAPI path

In Figure 2 above, double-click the "ISAPI and CGI Restrictions" icon, and then enter the setting interface, as shown below.

Figure 3: Add PHP ISAPI

As shown in Figure 3 above, click "Add" and enter the ISAPI path of php in the pop-up window, which is the file path of php5isapi.dll of the php decompression package. Fill in the description text as you like, such as "php", and check "Allow execution of extended paths" and click "OK".

 2.2.3 Add PHP handler mapping

Click on the computer name (Correction: You should click on the website name that needs to be set under "Website" instead of the computer name at the top. This setting is for a certain website), you will see "IIS" on the right "There is an icon of "Handler Mapping" below, as shown below.

Figure 4: IIS handler mapping

Double-click the "Handler Mapping" icon to enter the setting interface, as shown below:

Figure 5: Adding PHP handler mapping

Click "Add Script Mapping..." in the setting interface, and then fill in the corresponding content in the pop-up window. The request path is "*.php", and the executable file is the file path of php5isapi.dll in the PHP decompression package. , the same as the path filled in Figure 3. The name can be arbitrary, you can fill in "php", there is no need to set the request limit, click "OK" to complete the addition.

 2.2.4 Test Php

Use Notepad to enter the following lines of code:

 ?

1

2

3

phpinfo();

?>

1 2 3
<🎜>phpinfo();<🎜> <🎜>?>

Save it as: info.php, put it in the website directory, then start the browser and visit http://localhost/info.php. If you see the following screen, the installation is successful!

Figure 6: PHP successful running interface

The above is the entire content of this article, I hope you all like it.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/997704.htmlTechArticleA brief analysis of iis7.5 installation and configuration PHP environment windows server 2008 and windows server 2003 are currently the more mainstream server operations in China System, the environment for building PHP is also diverse, among which...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template