Home Backend Development PHP Tutorial The best configuration method for PHP in IIS6_PHP tutorial

The best configuration method for PHP in IIS6_PHP tutorial

Jul 21, 2016 pm 03:56 PM
lamp php but support method optimal of combination 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 the 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 with the Windows system installed , if the system disk is the 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 php.ini, generally the server that officially releases the website uses php.ini-dist, and the server used as a debugging server is better to use php.ini-recommended. 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 the PHP extension is placed. Please make sure it is the same as the directory you actually installed.
extension=php_mbstring.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_ifx.dll
;extension=php_iisfunc.dll
extension=php_imap.dll
;extension=php_interbase.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_shmop.dll
extension=php_snmp.dll
extension=php_sockets.dll
dll
extension=php_xslt.dll
extension=php_yaz.dll
extension=php_zip.dll
Of 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 up here is a directory on a ramdisk. Setting session.save_path on ramdisk can speed up session processing. If you have not installed ramdisk, you can assign it to any directory on other disks, such as 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" as 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", you can 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
phpinfo();
?>
If you open this page you can see PHP installation configuration information, even if the installation is successful.
If you want to execute the php program 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.
Upgrading
Upgrading is now very simple. You only need to download the new version of PHP binary compressed package, delete the original C:php directory, decompress the new version into 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/318088.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 , Perl's Web virtual host server, it is best to use Windows 2003 IIS6. There are many online...
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

Video Face Swap

Video Face Swap

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

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
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)

Hot Topics

Java Tutorial
1669
14
PHP Tutorial
1273
29
C# Tutorial
1256
24
PHP: A Key Language for Web Development PHP: A Key Language for Web Development Apr 13, 2025 am 12:08 AM

PHP is a scripting language widely used on the server side, especially suitable for web development. 1.PHP can embed HTML, process HTTP requests and responses, and supports a variety of databases. 2.PHP is used to generate dynamic web content, process form data, access databases, etc., with strong community support and open source resources. 3. PHP is an interpreted language, and the execution process includes lexical analysis, grammatical analysis, compilation and execution. 4.PHP can be combined with MySQL for advanced applications such as user registration systems. 5. When debugging PHP, you can use functions such as error_reporting() and var_dump(). 6. Optimize PHP code to use caching mechanisms, optimize database queries and use built-in functions. 7

PHP vs. Python: Understanding the Differences PHP vs. Python: Understanding the Differences Apr 11, 2025 am 12:15 AM

PHP and Python each have their own advantages, and the choice should be based on project requirements. 1.PHP is suitable for web development, with simple syntax and high execution efficiency. 2. Python is suitable for data science and machine learning, with concise syntax and rich libraries.

PHP and Python: Comparing Two Popular Programming Languages PHP and Python: Comparing Two Popular Programming Languages Apr 14, 2025 am 12:13 AM

PHP and Python each have their own advantages, and choose according to project requirements. 1.PHP is suitable for web development, especially for rapid development and maintenance of websites. 2. Python is suitable for data science, machine learning and artificial intelligence, with concise syntax and suitable for beginners.

PHP in Action: Real-World Examples and Applications PHP in Action: Real-World Examples and Applications Apr 14, 2025 am 12:19 AM

PHP is widely used in e-commerce, content management systems and API development. 1) E-commerce: used for shopping cart function and payment processing. 2) Content management system: used for dynamic content generation and user management. 3) API development: used for RESTful API development and API security. Through performance optimization and best practices, the efficiency and maintainability of PHP applications are improved.

The Enduring Relevance of PHP: Is It Still Alive? The Enduring Relevance of PHP: Is It Still Alive? Apr 14, 2025 am 12:12 AM

PHP is still dynamic and still occupies an important position in the field of modern programming. 1) PHP's simplicity and powerful community support make it widely used in web development; 2) Its flexibility and stability make it outstanding in handling web forms, database operations and file processing; 3) PHP is constantly evolving and optimizing, suitable for beginners and experienced developers.

PHP and Python: Different Paradigms Explained PHP and Python: Different Paradigms Explained Apr 18, 2025 am 12:26 AM

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

PHP vs. Other Languages: A Comparison PHP vs. Other Languages: A Comparison Apr 13, 2025 am 12:19 AM

PHP is suitable for web development, especially in rapid development and processing dynamic content, but is not good at data science and enterprise-level applications. Compared with Python, PHP has more advantages in web development, but is not as good as Python in the field of data science; compared with Java, PHP performs worse in enterprise-level applications, but is more flexible in web development; compared with JavaScript, PHP is more concise in back-end development, but is not as good as JavaScript in front-end development.

PHP and Python: Code Examples and Comparison PHP and Python: Code Examples and Comparison Apr 15, 2025 am 12:07 AM

PHP and Python have their own advantages and disadvantages, and the choice depends on project needs and personal preferences. 1.PHP is suitable for rapid development and maintenance of large-scale web applications. 2. Python dominates the field of data science and machine learning.

See all articles