Home Backend Development PHP Tutorial Analysis of the whole process of configuring PHP services in IIS6.0_PHP tutorial

Analysis of the whole process of configuring PHP services in IIS6.0_PHP tutorial

Jul 21, 2016 pm 02:59 PM
lamp php but Serve combination parse Configuration

Although the LAMP combination is very good, if you want to set up a Web virtual host server that supports PHP, ASP, ASP.NET, JSP, and Perl at the same time, it is best to use IIS 6 of Windows 2003. There are many articles on the Internet about configuring PHP on IIS 6, but those methods either have poor performance or are troublesome to upgrade. The following method allows you to upgrade very conveniently after the first configuration.

The upgrade mentioned here refers to upgrading from a certain php4 version to another php4 version, or from a certain php5 version to another php5 version, not from php4 to php5.

Preparation:
1. An installed Windows 2003 server, and IIS 6 has been installed.
2. Download the windows version of PHP binary compressed package

Installation:
Unzip the PHP binary compressed package to the C:php directory (assuming here that the C: drive is the system disk, that is, the disk where the Windows system is installed, if the system disk is D: disk, decompress it to the D:php directory, and so on, the same below).

Then open "My Computer"->"Properties"->"Advanced"->"Environment Variables"->"System Variables"->"path", edit its value and add it in front The following path address:
C:php;C:phpdlls;C:phpextensions;C:phpsapi;

Copy php.ini-dist or php.ini-recommended to the C:Windows directory and rename it to php.ini. Generally, php.ini-dist is used for the server that officially publishes the website, and php.ini-dist is used for debugging. php.ini-recommended is better. Of course, under normal circumstances, this php.ini still needs to be modified according to the actual situation.

Here are some necessary modification options:
extension_dir = "C:phpextensions"
This is the directory where PHP extensions are placed, please make sure The same directory as your actual installation.

Copy code The code is as follows:

extension=php_mbstring.dll
;extension=php_big_int.dll
extension =php_bz2.dll
extension=php_cpdf.dll
extension=php_crack.dll
extension=php_curl.dll
extension=php_db.dll
extension=php_dba.dll
extension=php_dbase .dll
extension=php_dbx.dll
extension=php_domxml.dll
;extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_filepro.dll
extension= php_gd2.dll
extension=php_gettext.dll
extension=php_hyperwave.dll
extension=php_iconv.dll
;extension=php_ifx.dll
;extension=php_iisfunc.dll
extension= php_imap.dll
;extension=php_interbase.dll
extension=php_java.dll
extension=php_ldap.dll
;extension=php_mcrypt.dll
extension=php_mhash.dll
extension= php_mime_magic.dll
extension=php_ming.dll
extension=php_mssql.dll
extension=php_msql.dll
;extension=php_oci8.dll
extension=php_openssl.dll
;extension= php_oracle.dll
extension=php_pdf.dll
extension=php_pgsql.dll
;extension=php_printer.dll
extension=php_shmop.dll
;extension=php_snmp.dll
extension= php_sockets.dll
;extension=php_sybase_ct.dll
extension=php_w32api.dll
extension=php_xmlrpc.dll
extension=php_xslt.dll
extension=php_yaz.dll
extension=php_zip .dll

For the above, those without a semicolon at the beginning are open extensions, and those with a semicolon are unopened extensions. The above settings include all extensions that can be turned on by default on Windows 2003 (the ones listed here are for PHP 4).

session.save_path = c:sessions
This is the directory where session files are saved by default. This directory must be an existing directory, otherwise the default session function will be invalid. What I set here is a directory on a ramdisk. Setting session.save_path on the ramdisk can speed up session processing. If you have not installed ramdisk, you can assign it to any directory on other disks, such as the C:sessions directory, C:WindowsTemp directory, etc.

OK, the basic work is done, now it’s time to configure IIS.

Open "Internet Information Services (IIS) Manager", in "Web Service Extension", select "Add a new Web Service Extension", the extension name can be filled in "PHP ISAPI Extension", the required file selection: C :phpsapiphp4isapi.dll (if PHP5 is installed, this is C:phpsapiphp5isapi.dll, the same below), and set the extension status to allowed.

Open "Website"->"Properties"->"ISAPI Filter"->"Add", fill in "PHP" for the filter name, and still select C:phpsapiphp4isapi.dll for the executable file.

Open "Website"->"Properties"->"Home Directory"->"Application Settings"->"Configuration"->"Application Extension"->"Add", you can To execute the file, choose C:phpsapiphp4isapi.dll. Fill in the extension ".php", and the action is limited to "HEAD, GET, POST".

Open "Website"->"Properties"->"Document"->"Enable default content document"->"Add" to add index.php as the default content document.

Then select "Server Machine Name"->"All Tasks"->"Restart IIS" to restart IIS.

Test
Create a test page in the default website publishing directory:

Download: phptest.php

Copy code The code is as follows:

phpinfo();
?>

If you can see the php installation configuration information when you open this page, the installation is successful.

If you want to execute PHP programs more optimally, you can install ZendOptimizer-2.6.0-Windows-i386.exe. The installation of this thing is very simple and will not be introduced here.

Upgrade
Upgrading is now very simple. You only need to download the new version of the PHP binary compressed package, delete the original C:php directory, extract the new version to the C:php directory, and then restart IIS. There is no need to modify any configuration or copy any files to the System32 directory. Isn’t it very convenient?

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/328141.htmlTechArticleAlthough the LAMP combination is very good, if you want to set up a machine that supports PHP, ASP, ASP.NET, and JSP at the same time For Perl's Web virtual host server, it is best to use Windows 2003's IIS 6. Net...
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 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
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 ?

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

How To Set Up Visual Studio Code (VS Code) for PHP Development How To Set Up Visual Studio Code (VS Code) for PHP Development Dec 20, 2024 am 11:31 AM

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

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