Win2k3 IIS6 PHP with Fastcgi_win server

Source: Internet
Author: User
Tags register php
1. Download and install fastcgi Extension for Internet Information Services 6.0

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

2, download php-5.2.5

Http://www.php.net/downloads

Extract to C:\PHP directory
To ensure that the IIS startup account has read execution permissions on c:\php\*

3. Register PHP to FastCGI
cscript fcgiconfig.js-add-section: "PHP"-extension:php-path: "C:\PHP\php-cgi.exe"

4, do some performance and security settings
C:\PHP\php.ini-recommended renamed to C:\PHP\php.ini
Open C:\PHP\php.ini, modify:
Extension_dir = "C:\PHP\ext"
Fastcgi.impersonate = 1
Cgi.fix_pathinfo=1
Cgi.force_redirect = 0
Perform:
cscript fcgiconfig.js-set-section: "PHP"-instancemaxrequests:10000
cscript fcgiconfig.js-set-section: "PHP"-environmentvars:php_fcgi_max_requests:10000
The above two sets the maximum pool and the number of response connections, can be modified according to their hardware configuration, usage

1. Download the latest RTM version of FastCGI here
2. Download Non-thread-safe (non-thread) version of PHP (currently the latest for PHP 5.2.5 non-thread-safe Win32 binaries)
3. Extract PHP to the directory you want to install, such as E:\PHP
4. Install FastCGI
5. Configure FastCGI & Integrated PHP
Start, run, CMD
CD%windir%\system32\inetsrv
cscript fcgiconfig.js-add-section: "PHP"-extension:php-path: "E:\PHP\php-cgi.exe"
6. Configure IIS & PHP
Start, run, inetmgr
Expand, select the site you want to configure, right-click, properties.
Switch to the Home Directory tab, configure, add, browse, select C:\Windows\system32\inetsrv\inetfcgiext.dll, OK
Extension to ". php", check "script engine" and "Check file exists", go all the way, back to the Site Properties dialog box.
Switch to the Documents tab, add, and enter "index.php" to determine the way.

Copy the Php.ini-recommend in the PHP installation directory, rename the copy to PHP.ini, and open the edit.
Find

Extension_dir =
Change the contents of the following quotes into your PHP extensions directory, such as E:\PHP\ext

Extension_dir = "E:\PHP\ext"
Look for fastcgi.impersonate, and change its value to 1, and note that the preceding;
Look for Cgi.force_redirect, and set its value to 0, pay attention to remove;

OK, done, put a test file in your site to run the check

<?php phpinfo ();?>

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.