PHP (FastCGI mode) configuration in IIS 7.5

Source: Internet
Author: User
Tags vc9

PHP has released a new version recently.5.3.1And update it to your own machine.

Version Selection

PHP 5.3 For Windows has four versions:

    • Vc9 x86 non thread safe
    • Vc9 x86 thread safe
    • Vc6 x86 non thread safe
    • Vc6 x86 thread safe

The official website has indicated that the version of vc9 is for IIS and the version of vc6 is for Apache. The reason for this distinction is that the vc9 version is compiled with Visual Studio 2008, And the CompilerProgramWith more optimizations, the performance is better. As for thead safe (thread Security)/Non thead safe (non-thread security), the official website does not explain their respective purposes. After Google, I found the answer: FastCGI isSingle threadTherefore, the thread security version is not required. Removing the thread security protection can improve the execution efficiency, while the ISAPI mode is multi-threaded. Therefore, the thread security version is required.

I tried to Install Version 5.3 before, but I had to go back to version 5.2 without running any errors. This time I found a prompt on the official website saying that the vc9 version needs to be installed first.Vc2008 Runtime Library(32-bit/64-bit ). This was the last time it was leaked.

Configure PHP. ini

Whether installed in Linux or windows, this is a step that cannot be ignored. The following configurations are required:

Date. timezone = "Asia/Shanghai"
FastCGI. Impersonate = 1
CGI. fix_pathinfo = 1
CGI. force_redirect = 0
Extension_dir = "./EXT"

Next, enable the corresponding extension as needed.

Add the PHP module to IIS

First, check that CGI is enabled in IIS:

Open the IIS manager and select the top directory tree on the left (this will make the settings valid for all sites ).

First click "FastCGI ", and other settings will follow the default settings. Then return to the upper-level view, open the "processing ing program", and add the PHP ing. The configuration is shown in:

Press "Win + R" to bring up the run dialog box and enter "iisreset" to restart IIS. So far, the configuration is complete, and there is no need to copy files or configure environment variables. Everything is so simple.

Http://heeroluo.net/ShowPost30.aspx

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.