Manually configure PHP for FastCGI under IIS 6

Source: Internet
Author: User

In the afternoon, you can run PHP on Windows Server 2008 and IIS 7. The home site is Windows Server 2003 and IIS 6. Although you can run PHP before, you are confused about the process, I don't know why, google turned it over and finally manually configured IIS 6 to run PHP with FastCGI. Post the implementation methods under IIS 7.

Environment:
Operating System:Windows 2003 Server SP2
PHP version: php-5.2.6-Win32

1. Download FastCGI For IIS6

Http://www.microsoft.com/downloads/details.aspx? FamilyID = 2d481579-9a7c-4632-b6e6-dee9097f9dc5 & displaylang = en

After downloading the SDK, double-click it to install it.

After installation, five files are generated in the C: WINDOWSsystem32inetsrv directory. For example:

FastCGI Handler is added to the "Web Service extension" of IIS.

2. Download PHP5.25 for Windows

Http://www.php.net/downloads.php

Download the. zip version, decompress it to the D: PHP Directory, and grant the read and run permissions to the IIS startup account group or user. For example:

You can decompress the package to another directory as needed.

3. Register PHP to FastCGI

Open the C: WINDOWSsystem32inetsrvfcgiext. ini file.

; This is the configuration file for the FastCGI handler for IIS 6.0.
; The FastCGI handler will look for this file in the same directory
; Fcgiext. dll. By default, the FastCGI installer will place this file
; The % windir % system32inetsrv directory.

My personal understanding is that when FastCGI Handler in "Web Service extension" is allowed, fcgiext is loaded. the fcgiext. the content of the ini configuration file provides ing for each website according to the configuration in it.

Add the following configuration under [Types:

[Types]
Php = PHP

[PHP]
ExePath = D: PHPphp-cgi.exe

"Php" indicates the extension. "PHP" is the name of the configuration section, which is defined in "[PHP.

4. Configure php. ini

Copy D: PHPphp. ini-recommended and rename it D: PHPphp. ini.

Open D: PHPphp. ini and modify:

Extension_dir = "D: PHPext"
Fastcgi. impersonate = 1

Modify the settings of php. ini as needed. Here, you can only run php, and restart IIS after modification.

5. Configure the website

Right-click a website and choose Properties> Home directory> Configuration> Add, as shown in the following figure:

Executable File Path: C:WINDOWSsystem32inetsrvfcgiext. dll

6. Write a php test.

<? Php
Phpinfo ();
?>

The following results show that your server can run php.

If the prompt is displayed:

No input file specified.

Fastcgi. impersonate is not configured.

If the process is troublesome, see:
Http://hi.baidu.com/imdao/blog/item/16583512f11cb654f819b858.html

If you still feel trouble, then go to the http://www.zend.com to download Zend Core, this does not need to configure anything, after installation can be used, even MySQL has.

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.