Home >Backend Development >PHP Problem >How to install php in iis 2008

How to install php in iis 2008

藏色散人
藏色散人Original
2021-10-28 09:19:501659browse

How to install php in iis 2008: 1. Install CGI; 2. Find the manager and create a new website; 3. Download the php environment installation package; 4. Create and modify php.ini; 5. Configure "Processing Application Mapping" of iis; 6. Restart IIS.

How to install php in iis 2008

The operating environment of this article: Windows2008 system, PHP5.6.9 version, DELL G3 computer

Win2008 Server configuration PHP environment:

Before configuring the PHP environment, you must first configure IIS.

Portal-> Configure and install 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. [Recommended learning: "PHP Video Tutorial"]

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, set the path,

The path inside is the storage path of the php you just decompressed plus ext, remember it is Backslash, remove the semicolon in front of

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 (Macao), 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,

Настройте iis «Сопоставление приложений обработки»

Добавить сопоставление модулей

Нажмите «Добавить сопоставление модулей» справа, чтобы отобразить настройки сопоставления модулей. В окне введите «*.php» в качестве имени, выберите «FastCgiModule» для модуля

и выберите «php-cgi.exe» в каталоге PHP, который вы только что скачали и настроили для выполнения программы.

Настроить документ по умолчанию

# Нажмите «Добавить» справа.

Перезапустите IIS.

Добавьте тестовый документ в корневой каталог веб-сайта и создайте новый "index.php". Содержимое можно установить на

Затем проверьте локально.

## PS: В системе 08 могут отсутствовать библиотеки. Прилагается адрес загрузки

32-битная загрузка распространяемого пакета Microsoft Visual C 2012. : http://download.microsoft.com/download/9/C/D/9CD480DC-0301-41B0-AAAB-FE9AC1F60237/VSU4/vcredist_x86.exe

64-разрядный распространяемый пакет Microsoft Visual C 2012 Загрузка: 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 in iis 2008. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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