Simple! How to install PHP extensions in IIS, simple iisphp extensions

Source: Internet
Author: User
Tags php windows windows download

Simple! How to install PHP extensions in IIS, simple iisphp extensions

Many online blogs introduce many configuration changes when installing PHP in IIS. In fact, most of them are unnecessary. For those who need to find out how to install PHP extensions, in fact, the most important thing is a version that can be used now. At this time, I think it is inefficient to introduce too many unnecessary configurations.

To sum up the installation steps, only three steps are required:

1. Download the PHP package;

2. Configure PHP;

3. Introduce PHP extensions to IIS;

Of course, there may be Step 2: Test.

Step 1: Download PHP

PHP windows version is directly provided with a compressed package, which includes all the files required to run, called silly installation, can be obtained from the windows Download Area on the official website ( ), note:

1. the PHP version is mainly divided into two types: PHP5.X and PHP7.X. You can select as needed. If you are a beginner, you can start with PHP7 directly, this version introduces a series of coooooooool features and greatly improves the running efficiency. If you need a specified framework or project, select a version by referring to the document.

2. the choice of the processor architecture mainly refers to X86 and X64, which are 32-bit and 64-bit respectively. It was written in 2017, and I believe that most developers have X64 processors and systems, select this version.

3. Select the thread-safe version as needed. ThreadSafe needs to take into account thread security, so there will be some efficiency loss, but the loss is not big; If FastCGI is used, you can directly choose Non-ThreadSafe.

All in all, if you have no special requirements, I suggest you choose PHP7.X X64 Non-ThreadSafe (PHP7, 64-bit architecture, Non-thread security version ).

Step 2: Configure PHP

First, select a directory to decompress it. We recommend that you create a folder under the root directory of the hard disk you program to decompress all the files. This is because future PHP requests will be sent to the CGI program in the specified position. It is best not to change it frequently.


Then, set this directory ("E: \ PHP" in this article ") add to the Path constant (right-click "my computer"> properties => advanced system settings => environment variable in the lower right corner of the Advanced Tab => system variable => Path ), note that you must add a semicolon (;) before adding it for segmentation. After being added to the Path variable, you can directly enter the file name without entering the complete Path in the PHP folder (you can search for the Windows command line search order ).

Then, set "php. copy the ini-development file and rename it as "php. ini ", which is the PHP configuration officially recommended for PHP development. For Beginners, we do not need to make any modifications. If your target framework or project has requirements, make changes as required (for example, specify extensions ).

So far, PHP configuration is complete.

Step 3: Introduce IIS

Open the IIS management tool and select "process application ing ".

On the New Page, select "add module ing"

Enter the following information:

The first line indicates which files will be handed over to PHP for processing. *. php indicates that all files with the PHP extension will be handed over to php-cgi for processing.

The second row indicates the type of this module ing. If there is no special requirement, select FastCGI.

The third line represents the processing of the location, go to the extract directory of PHP, and select php-cgi.exe.

The name is only used as a flag and can be entered at will.

After you click OK, you will be asked whether to automatically add the permit rules. Then, you can confirm.

So far, IIS installation of PHP extension is complete.

Step 4: Test

Create a test. php file in the default website directory and enter


Open the browser and access localhost \ test. php. The following information indicates that the installation is successful.


Related Article

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: 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.