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".
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!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

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.

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 Chinese version
Chinese version, very easy to use

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.
