Iis7.5 install and configure the php environment, iis7.5 install and configure php

Source: Internet
Author: User

Iis7.5 install and configure the php environment, iis7.5 install and configure php

Preface

 

Iis7.5 is a web server installed in win7 and win8, and iis6.0 is used for win2003 and win2000 web servers. Since windows and win8 systems are different from win2003 and win2000 systems, therefore, you must be familiar with the iis7.5 configuration. However, these are all operational things. Just as I first came into contact with iis6.0, I became familiar with them after several operations.

Now I need the web server to run the php program, so I need to configure the php environment. It was easy at first, because it has been configured for countless times in iis6.0, and the off-star PHP is automatically installed for 30 seconds. However, after iis7.5 is enabled, I found that most of the things familiar with iis6.0 could not be found in iis7.5, and I had to find them. This article introduces how to install and configure php In iis7.5 based on your actual experience.

1. Prepare files

First, make sure that you have downloaded and decompressed the php program file. If not, download one first. Php program files do not need to be installed. You can extract the downloaded package to any folder. In this case, PHP 5.2.13 is used.

Official website download Php Execution file: http://windows.php.net/download/

2. Configure IIS 2.1 to add an ISAPI filter

Go to "Control Panel"-"program"-"enable or disable Windows", expand "Internet Information Service", select "ISAPI filter", and click "OK, as shown in:

Figure 1: Enable ISAPI filter

2.2 set ISAPI2.2.1 to open IIS Manager

Enter the IIS Manager (method: Right-click "computer", and then click "manage". In the displayed interface, expand the "service and application" project, double-click "Internet Information Service (IIS) manager" to go To the IIS Management page, as shown in.

 

Figure 2: Open IIS Manager

2.2.2 Add the php isapi path

In step 2, double-click the "ISAPI and CGI restrictions" icon to go to the settings page, as shown in.

 

Figure 3: Add a PHP ISAPI

As shown in 3, click "add" and enter the php ISAPI path in the pop-up window, that is, php5isapi of the php decompression package. dll file path. Enter the description text at will, for example, "php". Select "allow extension path execution" and click "OK ".

2.2.3 add PHP handler ing

Click the computer name (correct: Click the name of the website to be set under "website", instead of the top computer name. This setting is for a website ), the "handler ing" icon under "IIS" on the right is displayed, as shown in.

 

Figure 4: IIS handler ing

Double-click the "handler ing" icon to go to the settings page, for example:

 

Figure 5: Add a PHP handler ing

On the settings page, click "add script ing... ", and then fill in the corresponding content in the pop-up window. The Request Path is" *. php ", the executable file is the php5isapi of the php decompression package. dll file path, which is the same as the Path entered in figure 3. The name is random. You can enter "php". You do not need to set the request limit. Click "OK" to add it.

 

2.2.4 test Php

Enter the following lines of code in Notepad:

<? Php
Phpinfo ();
?>

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

Figure 6: php running success page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.