Home  >  Article  >  Backend Development  >  Can PHP run directly on IIS?

Can PHP run directly on IIS?

(*-*)浩
(*-*)浩Original
2019-09-28 11:01:474480browse

How to run PHP under IIS:

Can PHP run directly on IIS?

1. Install PHP5.3.6

1 ) Turn off the firewall, unzip php5.zip to D:\PHP\php5 (recommended learning: PHP video tutorial)

2) Copy the php.ini files to D:\PHP\ php5 and C:\WINDOWS directory

3) Grant the users group read and execute permissions to the php installation directory (D:\PHP\php5)

4) In D:\PHP\ Find the files named php_mysqli.dll, php_mysql.dll, libmysql.dll, libmcrypt.dll in the php5 folder and copy them to the C:\windows\System32 folder (Note: IIS needs this file to process PHP and MYSQL ).

2. Configure IIS

1) Create a new website under IIS, where your php website files can be stored. For example, the new virtual directory jihetuan points to the E:\jihetuan directory on the computer.

2) Click "Add" on the "Mapping" tab to open the "Add/Edit Application Extension Mapping" dialog box, click "Browse" after "Executable File", and navigate to D: \PHP\php5\php5isapi.dll, enter ".php" in the text box after "Extension" (Note: Be sure to pay attention to the period before the extension), and click OK.

3) Add index.php as the default document in the Document tab. You don’t have to add it.

4) Click "OK" again to exit the "Application Configuration" dialog box, and click "OK" again to exit the PHP Properties dialog box.

5) Restart IIS to take effect.

The above is the detailed content of Can PHP run directly on IIS?. 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