search
HomeTopicsIISHow to configure the PHP running environment in IIS under Windows 10 (detailed steps)

This article will take you through how to configure IIS to run PHP, and introduce how to configure IIS to run PHP under Windows 10. I hope it will be helpful to everyone!

How to configure the PHP running environment in IIS under Windows 10 (detailed steps)

1: Install IIS server

1. Enter Control Panel>>Programs and Features >>Turn Windows features on or off, find Internet Information Services, Remember to select CGI

##2. After the installation is complete, open localhost in the browser and check whether the IIS welcome page can be displayed:

2: Download, install and configure the PHP environment

1. Download PHP, official website address: http://windows.php.net/download/,

2. Unzip the downloaded zip package to the D drive. After decompression: E:\php;
3. Enter Control Panel>>Administrative Tools>>Internet Information Services (IIS) Manager;
4. Select "Handler Mapping" in the middle window and double-click it, then click on the far right Select "Add Module Mapping"

5. In the "Executable File" column, find the PHP installation directory E:\php, right Change the file type in the lower corner to "exe" and you will see the "php-cgi.exe" file

How to configure the PHP running environment in IIS under Windows 10 (detailed steps)

6. Then you can add default documents to the website: default.php and index.php.

How to configure the PHP running environment in IIS under Windows 10 (detailed steps)

You also need to perform the following configuration:

7. Enter the E:\php directory and rename the file php.ini-development to php.ini And copy it to the desktop;

8. Next you need to modify the php.ini file on the desktop.

After opening the php.ini file, use the shortcut key ctrl F Search date.timezone and change it to date.timezone="Asia/Shanghai" to modify the current time zone

Activate the extended options you need, that is, delete the semicolon ";" before the corresponding dll statement

extension=php_gd2.dll

extension=php_mbstring.dll
extension=php_mysql.dll
extension=php_pdo_mysql.dll

Search extension_dir= and change it to

extension_dir = “E:\php\ext\”, save it after modification and checking, and then cut the php.ini file on the desktop to the C:\Windows directory (why not just copy the file directly at the beginning Come here to modify it, because Windows 8 involves permission issues, so copy it to the desktop for modification first, of course you can also put it in other directories for modification)

9.php environment configuration Okay, we can test it. Create a new index.php file in the created website directory (note that it is index.php, not index.php.txt) with the content of "

PS1: (Enter the php installation directory on the command line and enter " php -m" command can view the opened dll extension module)

PS: By the way, I would like to recommend the open source PHP extremely fast background development framework LotusAdmin written by myself.

Ps2: PHP website development requires the mysql database. For the mysql database environment configuration and installation diagram, see (http://www. jb51.net/article/23876.htm).

Free recommendation: IIS installation

The above is the detailed content of How to configure the PHP running environment in IIS under Windows 10 (detailed steps). For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:博客园. If there is any infringement, please contact admin@php.cn delete
IIS and PHP: Exploring the CompatibilityIIS and PHP: Exploring the CompatibilityApr 18, 2025 am 12:11 AM

IIS is compatible with PHP and is implemented through the FastCGI module. 1.IIS supports PHP through the FastCGI module, making PHP run as an independent process. 2. Configuring IIS to run PHP requires defining the handler in the configuration file. 3. Basic usage includes enabling the FastCGI module and setting up PHP handlers. 4. Advanced usage can configure PHP environment variables and timeout settings. 5. Common errors include version incompatibility and configuration issues, which can be diagnosed through logs. 6. Performance optimization is recommended to adjust the PHP process pool size and enable OPcache.

The Continued Relevance of IIS: Why It PersistsThe Continued Relevance of IIS: Why It PersistsApr 17, 2025 am 12:01 AM

IIS remains relevant in the age of cloud native and containerization because of its versatility, integration with modern technologies, and its advantages in performance optimization and security. 1) IIS supports a variety of development frameworks and modern web functions. 2) It can be seamlessly integrated with technologies such as Azure, Docker and other technologies. 3) IIS improves performance and provides security through various technologies, and is suitable for hosting internal and external websites of the enterprise.

Running PHP on IIS: A Practical TutorialRunning PHP on IIS: A Practical TutorialApr 16, 2025 am 12:10 AM

Running PHP applications on a Windows server is feasible and practical. 1) Install and configure IIS, 2) Integrate PHP through FastCGI, 3) Solve common problems such as MIME type configuration and extended loading, 4) Optimize performance settings using OpCache and FastCGI, 5) Follow PHP best practices such as using namespaces and PSR standards.

The Purpose of IIS: Serving and Managing Web ContentThe Purpose of IIS: Serving and Managing Web ContentApr 15, 2025 am 12:12 AM

IIS is a web server software developed by Microsoft to host and manage websites. 1) IIS can handle static and dynamic content, 2) Provide management tools that seamlessly integrate with Windows, 3) Support HTTP, FTP, SMTP and other protocols, 4) Provide security functions such as SSL/TLS encryption, and 5) Optimize website performance through load balancing, caching, etc.

IIS in Action: Real-World Examples and Use CasesIIS in Action: Real-World Examples and Use CasesApr 14, 2025 am 12:12 AM

IIS's real-world applications include in-business departmental websites, high-traffic e-commerce websites and API gateways. 1) In-business departmental websites utilize the powerful features of IIS and seamless integration with Windows systems, 2) High-traffic e-commerce websites improve user experience by configuring load balancing and using ARR, and 3) IIS manages and protects API access through URL rewriting and reverse proxying.

IIS and PHP: The Steps for Successful IntegrationIIS and PHP: The Steps for Successful IntegrationApr 13, 2025 am 12:07 AM

The integration of IIS and PHP can be achieved through the following steps: 1. Install PHP, 2. Add PHP handler in IIS, 3. Test the configuration. After integration, IIS will pass the PHP file request to the PHP interpreter for execution and return the result to the client to achieve efficient web services.

Using PHP on IIS: A Comprehensive GuideUsing PHP on IIS: A Comprehensive GuideApr 12, 2025 am 12:19 AM

Configuring and running PHP applications on IIS requires the following steps: 1. Install IIS and PHP, make sure IIS is enabled and download the PHP ZIP file. 2. Add a website or application in IIS Manager and configure the handler to map to the PHP executable file. 3. Use simple PHP scripts to test the configuration. 4. Debug by checking log files and error logs. 5. Optimize performance, including using application pools and adjusting php.ini settings.

Beyond the Hype: Assessing the Role of IIS TodayBeyond the Hype: Assessing the Role of IIS TodayApr 11, 2025 pm 12:25 PM

IIS remains important in today's technological environment. 1) IIS is tightly integrated with Windows systems, providing powerful management and security functions. 2) It supports advanced usage from simple website hosting to complex load balancing and SSL management. 3) Through optimization and best practices, IIS still has powerful functions and stability in enterprise and personal applications.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Will R.E.P.O. Have Crossplay?
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment