Win7 in IIS7 to configure PHP fastcgi Support _ Note _win Server

Source: Internet
Author: User
Tags mssql php source code
In the Windows7 Control Panel-Program "Turn on/Off Windows", open IIS inside, and don't forget to open the CGI (this default is not optional) in IIS, as shown below (don't cut yourself, just use Microsoft's diagram):

Then it's OK, wait for the installation, PHP next, download in "http://windows.php.net/download/", I'm under VC9 x86 Thread Safe zip package, 5.3.1 (latest in writing). After a good decompression to any directory, I put the C:\php directory, do the following work:

1, the contents of the php.ini-development changed to PHP.ini, with Notepad open;

2, fastcgi.impersonate=1 (and the beginning of the semicolon deleted, the same below)

3, Cgi.fix_pathinfo=1

4, Cgi.force_redirect=0

5, extension_dir= "./ext"

6, open the need for expansion, such as Extension=php_mysql.dll

On the 6th I explained that the first to do most of the documents, even php_mssql.dll to open together, the result has been unsuccessful, because there is no ext directory Php_ Mssql.dll This file, about the support of MSSQL I still do not understand, here temporarily do not open php_mysql.dll, so that you can pass smoothly.

7, this step many documents are not, date.timezone= Asia/shanghai (according to PHP documents, here not only can be set to Shanghai, as well as Chongqing and other fields can also, the details of the reference: http://www.php.net/ manual/en/timezones.asia.php.

OK, the above is done, the PHP section can be finished, you can "start-run-cmd" under the try to run C:\php\php-info and c:\php\php-v, normally,-info parameters can see a lot of parameter information, and the-v parameter can see PHP version information ,-V is prompted if the extension of the DLL file does not exist.

Next, go back to IIS, open the IIS console, select the top node in the left tree, your computer name, and then open "Handler mappings" in the middle (functional view), as shown in the following figure:

After opening, in the rightmost point, add Module mapping (add modular Mapping), add the information as shown below:

(Sorry, the picture is Microsoft, can not see clearly, below say)

Request Path: *.php

Module: Fastcgimodule

Executable file: C:\php\php-cgi.exe (here, for the time of choice, change the type from DLL to EXE)

Name: PHP via FastCGI

Then OK, then yes (figure)

Restart iis!

Here, we can enjoy, how to try?

Make a test.php file, the contents of which are <?php phpinfo (), and then play localhost/..../text.php in the browser.

(This interface I use my own diagram to prove that I really deserve it)

(finally), I do not really understand PHP, very vegetables, but occasionally use some PHP source code, so here I write things are said to the people like me to see, High man to guide welcome, humiliate my level please bypass, provincial keyboard.

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.