Home  >  Article  >  Backend Development  >  How to install php in iis5.1

How to install php in iis5.1

藏色散人
藏色散人Original
2021-09-26 09:33:101454browse

How to install php in iis5.1: 1. Download apache and install it; 2. Download "php-4.4.2-Win32" and extract it to "E:\php"; 3. Configure the PHP file; 4. Open IIS and create a new virtual directory; 5. Use "phpinfo();" to test whether PHP is installed successfully.

How to install php in iis5.1

The operating environment of this article: winxp sp3 iis5.1, php-4.4.2-Win32, apache_2.2.6-win32-x86-no_ssl.msi version, DELL G3 computer.

How to install php in iis5.1?

iis5.1 configure php running environment

The 80 port should be left empty when installing apache.

Search the Internet to download apache and install it. During the installation, three input boxes will appear, which are about the domain name and email address. Just fill them in casually, and then keep pressing the default next step until it is completed. When the installation is successful, an icon similar to a small hat with a green triangle will appear on the taskbar, indicating that the installation has been successful.

The next step is to configure the PHP file. After downloading php-4.4.2-Win32, unzip it to E:\php. Do not unzip the folder with a Chinese name to avoid being in IIS. It cannot be added when adding mapping.

After unzipping, find the file php.ini-dist, make a copy and rename it to php.ini, open it with Notepad and search for;extension=php_mysql.dll and change it to extension=php_mysql.dll, Then continue to search for extension_dir = "./" and change it to extension_dir = "E:\php\". The last diagonal bar cannot be missing. Save and exit, and copy it to c:\windows

In E: Find the files named php4ts.dll, libmysql.dll under the \PHP\ folder and E:\PHP\dlls, and copy them to the C:\windows\System32 folder

Then open IIS, create a new virtual directory, after it is created, open the virtual directory-"Home Directory-"Configuration-"Add, browse to E:\PHP\sapi\php4isapi.dll, enter .php in the extension, this If the OK button below cannot be clicked, it may be because your PHP installation package is placed in a Chinese directory. At this time, confirm all the way to exit. Finally, create a new file test.php

in the virtual directory and enter the following Content:

<?php
        phpinfo();
?>

Test whether the installation is successful. .

This is the first time to configure PHP. If there is anything inappropriate, please point it out.

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of How to install php in iis5.1. 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