What are the steps to set up IIS and install php7.2 under the WIN10 system?

Source: Internet
Author: User
Tags configuration php php server system log
How do I install php7.2 through IIS under the WIN10 system? In the following article I will give you an introduction to the IIS settings under the WIN10 system and how to install Php7.2,n through IIS. So, let's take a look at the php7.2 installation process.

To turn on IIS and related features:

Control Panel-Programs and features-turn Windows features on or off-tick Internet information service--World Wide Web service-performance and features-tick CGI

After a successful turn on the Computer Management--service and referral program there will be IIS Manager

To install the configuration PHP:

Download Php,none thread (non-thread safe) and thread (thread safe) version of the selection:

Two ways of executing PHP: ISAPI and fastcgi. FastCGI execution is performed in a single thread, so there is no need for thread security checks, and removing thread security checks can improve execution efficiency, so if PHP is executed in FastCGI (whether with IIS 6 or IIS 7), it is recommended to download, execute Non-thread Safe php (PHP binary files are packaged in two ways: MSI, zip, download zip kit). Thread safety checks are prepared for the ISAPI way of PHP, because there are many PHP modules that are not thread-safe, so you need to use the thread safe PHP.

Because I use fastcgi below, so I downloaded the none thread version.

1. Download and unzip to d:/php

2, the D:\php directory under the Php.ini-developer backup, and modify the file name is PHP.ini

3, edit php.ini: (Remember to remove the beginning of the comment)

Extension_dir = "D:\php\ext"
Doc_root = "C:\inetpub\wwwroot"

The value of Extension_dir is the ext directory under the PHP installation directory, and the value of Doc_root is the home directory of the IIS default settings;

4. Set environment variables. After path, add the following value: ;D: \php When configured here, enter PHP--help in DOS with the correct hints

  5. IIS Manager Home Page--iis--Handler mappings--Add module mappings

Verify that the installation is successful:

Create a new file hello.php under C:\inetpub\wwwroot. Input content:


After saving, open the browser, enter the address: http://localhost/hello.php. If the page displays Hello World, the installation is correct.

We can also view the source code of hello.php in the Web page, if there is no PHP code in the source code, it also indicates that the installation is correct.

Problems you may encounter:

Server reported a 505 error due to lack of visual c++2011

The page shows no input file specified, the reason: If you use the IDE's own Web server, you need to php.ini doc_root = "C:\inetpub\wwwroot" commented out

Set PHP time zone, modify Date.timezone = "Asia/shanghai" in php.ini

IIS Wwwroot directory is in C drive so you need to manually turn on Write permission

  Open the PHP Server system log, set log_errors = On in PHP.ini, and set the Error_log ("test") in the Error_log = D:/php/error.log program to output the test to the log file. You can also set display_errors = off to turn off error echo, in case the path, database connection, data table, and other information revealed by these errors are compromised by hackers.

Related recommendations:

How do I install IIS, MYSQ, Nginx, php7.1.7 under Win10?

iis8+php How the environment is configured under Windows Server 2012 (figure)

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.