Table of Contents
Create a website
Configure PHP environment
Download and unzip everything to a custom directory
Modify php.ini
Configure iis's "Processing Application Mapping"
Home Backend Development PHP Problem How to install php environment in Win2008 system

How to install php environment in Win2008 system

Dec 15, 2021 am 10:34 AM
php

How to install the PHP environment in Win2008 system: 1. Configure IIS; 2. Create a website; 3. Download the PHP environment installation package and configure the PHP environment; 4. Modify php.ini; 5. Configure iis Just "Process Application Mapping".

How to install php environment in Win2008 system

The operating environment of this article: Windows2008 system, PHP version 5.6.9, Dell G3 computer.

How to install the php environment in Win2008 system?

Win2008 Server configuration PHP environment:

Reading directory

  • Create a website
  • Configuring the PHP environment
  • Configuring the "Processing Application Mapping" of iis

Configure IIS first before configuring the PHP environment.

Portal-> Configuring and installing IIS under Win2008 Server

If IIS is installed with the default configuration, you also need to install CGI.

Check CGI here and install it.

Create a website

Find the manager

Delete the default website.

Create a new website. Right-click the website and select Add Website

Configure the website name as you like, and the physical path is the path where the website is stored

If the server has a bound domain name, set it to the host name configuration.

If not, just leave it blank by default.

Go to the root directory of the website and add an html document at will, and then test it

Configure PHP environment

Download the PHP environment installation package and choose the version you need

http://windows.php.net/downloads/releases/archives/

What I downloaded here is php-5.6.9-nts-Win32-VC11-x86.zip

There are two execution methods of PHP: ISAPI and FastCGI.

nts is Non Thread Safe and is non-threaded Safety, this is based on the FastCGI execution method. It uses a single thread to perform operations, so there is no need to perform thread safety checks.

Removing the protection of thread safety checks can improve execution efficiency, so if FastCGI is used To execute PHP, it is recommended to choose the NonThread Safe version.

On the other hand, if you use ISAPI execution mode, it is recommended to choose the Thread Safe version.

Download and unzip everything to a custom directory

Create a php.ini, php.ini is renamed from php.ini-production

Modify php.ini

Search extension_dir and set the path.

The path inside is the storage path of the php you just decompressed plus ext. Remember it is Backslash, remove the preceding semicolon

Enable components as needed, here are some commonly used ones. Just remove the semicolon to enable it.

If you need anything in the future, just enable it. Of course, if you find it troublesome, just enable it all now.

;extension=php_gd2.dll

;extension=php_curl.dll

;extension=php_mbstring.dll

;extension=php_exif.dll

;extension=php_mysql.dll

;extension=php_mysqli.dll

;extension=php_scokets.dll

;extension=php_pdo_mysql.dll

Search date.timezone to set the time zone to avoid time confusion. Remember to remove the semicolon

. For example: Asia/Chongqing (Chongqing), Asia/Shanghai (Shanghai), Asia/Urumqi (Urumqi), Asia/Macao (Macau), Asia/Hong_Kong (Hong Kong), Asia/Taipei (Taipei), PRC

Set fastcgi.impersonate and cgi.rfc2616_headers

Set cgi.force_redirect = 0 Open Execute PHP in CGI mode

Turn on short tag support,

Configure iis's "Processing Application Mapping"

Add module mapping

Click "Add Module Mapping" on the right to pop up the module mapping settings In the window, enter "*.php" for the name, select "FastCgiModule" for the

module, and select "php-cgi.exe" in the PHP directory you just downloaded and configured to execute the program

Configure default document

Click Add on the right.

Restart IIS.

Add a test document in the root directory of the website and create a new "index.php". The content can be set to

Then test it locally.

PS: The 08 system may lack libraries. Attached is the download address

32-bit Microsoft Visual C Redistributable 2012 download: http://download. microsoft.com/download/9/C/D/9CD480DC-0301-41B0-AAAB-FE9AC1F60237/VSU4/vcredist_x86.exe
64-bit Microsoft Visual C Redistributable 2012 Download: http://download.microsoft.com/download /9/C/D/9CD480DC-0301-41B0-AAAB-FE9AC1F60237/VSU4/vcredist_x64.exe

The above is the detailed content of How to install php environment in Win2008 system. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

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)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

CakePHP Project Configuration CakePHP Project Configuration Sep 10, 2024 pm 05:25 PM

In this chapter, we will understand the Environment Variables, General Configuration, Database Configuration and Email Configuration in CakePHP.

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

CakePHP Date and Time CakePHP Date and Time Sep 10, 2024 pm 05:27 PM

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

CakePHP File upload CakePHP File upload Sep 10, 2024 pm 05:27 PM

To work on file upload we are going to use the form helper. Here, is an example for file upload.

CakePHP Routing CakePHP Routing Sep 10, 2024 pm 05:25 PM

In this chapter, we are going to learn the following topics related to routing ?

CakePHP Working with Database CakePHP Working with Database Sep 10, 2024 pm 05:25 PM

Working with database in CakePHP is very easy. We will understand the CRUD (Create, Read, Update, Delete) operations in this chapter.

Discuss CakePHP Discuss CakePHP Sep 10, 2024 pm 05:28 PM

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

CakePHP Creating Validators CakePHP Creating Validators Sep 10, 2024 pm 05:26 PM

Validator can be created by adding the following two lines in the controller.

See all articles