Installation and configuration of iis + php + mysql in Windows 2003

Source: Internet
Author: User
Tags install php iis mysql in php file win32 zip


I used apache in the past. Due to work needs, I had to configure the php environment of iis. I found some information on the Internet and configured it at once. In fact, I have experience with apache + php + mysql, this is easy to understand.

Let's take a look at the general steps.

Step 1: download the program

Download php-5.2.0-win32.zip”, “mysql-noinstall-5.0.22-win32.zip ", which is available on Baidu.

Step 2: install php

(1) copy the downloaded php-5.2.0-win32.zip to the D disk, and then right-click and unzip the php-5.2.0-win32 directory;

(2) in the D:/php-5.2.0-Win32 folder, find the "php. ini-dist" file and copy it as a copy, so that you can restore it after an error occurs. Rename the copied file to "php. ini ";

(3) open "php. ini file, find "extension_dir", and then set extension_dir = ". /"extension_dir =" D:/php-5.2.0-Win32/ext "; (note: here should use a slash/rather than a backslash \). As shown in the following figure;

(4) configure php extension support in php. find the following line in the INI file: remove the semicolon before "; extension = php_mysql.dll"; "; extension = php_gd2.dll"; "; extension = php_mbstring.dll, php supports these extensions;
 
(5) save and close the php. Ini file and copy it to the C:/Windows directory;

(6) in the D:/php-5.2.0-Win32 folder find the name php5ts. dll, libmysql. dll file and copy it to the C:/windows/System32 folder (note: This file is required for IIS to process PHP 5 and MYSQL ).

So far, php installation is complete!

Step 3: install and configure IIS

I believe everyone is familiar with this.

(1) control panel-> add/delete programs-> add/delete windows components, check IIS. If no disk is installed, you can go to the next iis package extracted from the installation disk. After the installation is complete, an Inetpub folder will be created on drive C.

(2) open the Internet Information Service (IIS) manager in administrative tools, or enter "inetmgr" (excluding quotation marks) in the running dialog box to confirm.

(3) right-click "website" under "Internet information service" on the left, select "properties", or bring up a familiar "website properties" panel, switch to the "main directory" tab, click "configuration" below, a "application configuration" box will pop up, click the "add" button below, finally, locate D:/php-5.2.0-Win32/php5isapi in the executable file in the pop-up box. dll, enter ". "php" (note: add a few points before the extension) and click "OK. As shown in the following figure;

(4) right-click "web service extension" under "Internet information service" on the left, and click "add a new web service extension ", add a new web extension-input: PHP, and then point the executable file to php5isapi. dll path, set it to "allow", and click "OK" (I missed this step and reported that the 403 page was inaccessible when accessing the php file, then I found out for half a day ). As shown in the following figure;

At this point, the basic configuration of IIS is complete, and do not forget to restart iis.

Net stop w3svc
Net start w3svc

Step 4: install MYSQL

This will not be said. Basically, the next step will be done. If you are not sure, you can go to Baidu. The graphic tutorials are also very detailed.

Last step: test whether the configuration is successful

Create a site under iis, create a "test. php" file under the site directory, write a sentence "" to it, save and close the file. Then access the webpage through a browser. If the webpage can be opened and the following screen appears, the configuration is successful. Slide the page slowly. If there is a mysql option, mysql is installed successfully.

This method is summarized after my configuration is successful. If you have any questions, leave a message.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.