Home > Backend Development > PHP Problem > Detailed explanation of how to install php environment in iis

Detailed explanation of how to install php environment in iis

藏色散人
Release: 2023-03-01 22:42:01
Original
2865 people have browsed it

How to install php environment in iis: first download php and unzip php to a directory; then find and click "Add a new Web service extension"; then fill in "D:" in the window that appears. \PHP\php5isapi.dll"; finally restart IIS.

Detailed explanation of how to install php environment in iis

First step

Download php

Address: https://windows.php .net/downloads/releases/archives/

Just download the compressed package

Step 2

Unzip php to a directory, For example, D:\php

There are two php.ini in the php directory, one is php.ini-dist, which is more suitable for development; the other is php.ini-recommended, which is more suitable for configuring the operating environment, because This is slightly more secure.

 So we copy php.ini-recommended to C:\WINDOWS, rename it to php.ini, and then open it with Notepad

 1. Search for "extension_dir" and find extensino_dir=" ./"Change to extension_dir ="D:\php\ext"

 2. Search for;extension=php_mysql.dll and remove the semicolon in front";"

 3. Change D: \php\php5ts.dll is copied to C:\windows\system32.

Copy D:\php \libmysqls.dll to the C:\windows\system32 directory

Step 3

1. Control surface Version -> Management Tools -> Internet Service Manager -> Click to find Web

Service Extensions -> Click "Add a new Web Service Extension" in the right window -> The extension is

 "PHP"——》Click "Add"——》In the window that appears, fill in "D:\PHP\php5isapi.dll" and confirm, then click Web Service Extension PHP and select Allow

2. Press

on the "Default Website Properties" window. Click the "Home Directory" tab and click the "Configuration" button. In the pop-up "View" window, click the "Add" button. In the "Add/Edit Application Extension Image" dialog box, enter "D:\PHP\php5isapi.dll" in the "Executable File" text box

Enter ". php" (note that there must be that point) and check the "Check whether the file exists" item

3. Click the ISAPI Filter" tab in the "Default Web Site Properties" window , click the "Add" button, enter "PHP"

in the "Filter Name" of the pop-up "Filter Properties" window, and browse to select "D:\PHP\sapi\" in the "Executable File" php5isapi.dll"

A: Restart IIS 6.0 to start loading PHP

B: Click the ISAPI Filter tab on the "Default Web Site Properties" window. If you see The PHP arrow is green and upward, which proves that PHP has been successfully loaded by IIS 6.0.

It needs to be explained here. If the red arrow points downward, it means that the loading is not successful. This is due to permissions. Just add "Run" permission to the user user in the php directory.

Another thing to note is that there is a short_open_tag in php.ini. The optional attributes are "On" and "Off". If you select on, it is not very strict and you can just use You can run it. If it is set to off, you must add php.

For a lot of related knowledge, please visit

PHP Chinese website

!

The above is the detailed content of Detailed explanation of how to install php environment in iis. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template