Home >Backend Development >PHP Problem >How to configure php running environment in IIS
How to configure the PHP running environment in the IIS environment
##Step one: Download and install the PHP support package
1. To make Windows support PHP, first go to the official website of the PHP language (
http://www.php.net/downloads.php) to download an installation package, the latest version It is 5.4.3, as shown below.
1、extension=php_gd2.dll '用作gd库支持 2、extension=php_mbstring.dll '用作phpmyadmin的溶错(此项可选) 3、extension=php_mysql.dll '让php开放支持mysql 配置完以上步骤后,还需将php文件夹下的ext下的php_gd2.dll、php_mbstring.dll、php_mysql.dll三个dll文件复制在C:\windows\system32下既可
Step 2: Configure PHP in IIS
Select Start Menu->Programs-> Management Tools -> Internet Information Services (IIS) Manager, and then click "Add a new Web Service Extension" in "Web Service Extension", as shown below. The "New Web Service Extension" window will appear. Enter "php" in the "Extension Name", then click the "Add" button inside and add C:\ Ricky\php-5.1.2-Win32\php5isapi.dll is added to it. Note that the file cannot be mistaken. It is "php5isapi.dll", not the "php5ts.dll" we mentioned above. Finally, check "Set extension status to running" (that is, enable support for PHP files) and confirm, as shown below. You can now see the item you just added in the Web Services Extensions list. As shown below After the above settings are completed, we still need to set the properties of the website. Open Internet Information Services (IIS) Manager->Local Computer->Website->Default Website. Right-click the default website and select Properties in the right-click menu. The website's property settings window will appear. Then we select the "Home Directory" tab and click the "Configure" button inside, as shown below. Finally, we click the "Add" button in the "Application Configuration" window, enter "php" in "Extension", and add "php" in "Executable File" The C:\Ricky\php-5.1.2-Win32\php5isapi.dll mentioned above is added to it, as shown below.Part 3 Verify whether the installation is successful
After some hard work before, we can use the following method to Test whether the PHP running environment is successful. First, run Notepad and enter the following lines of code:<?php phpinfo(); ?>Save it as: C:\Inetpub\wwwroot\test.php file. Then start the browser and visit
http://localhost/text.php. If you see the following screen, the installation is successful! As shown below
Okay, so far our PHP running environment has been successfully set up Related references: php中文网
The above is the detailed content of How to configure php running environment in IIS. For more information, please follow other related articles on the PHP Chinese website!