Windows Server IIS configure PHP and MySQL environment graphics tutorials

Source: Internet
Author: User
Tags mysql in php and php and mysql win32
First download PHP, open the PHP official website download page: http://www.php.net/downloads.php, I use here is the Php-5.2.5-win32 version, a bit old, but the same.
Unzip the downloaded Php-5.2.5-win32 file into the c:php directory (this directory can be optional, put in this directory can be less to do configuration changes).
The c:php directory of Php.ini-dist or php.ini-recommended copied to the C:windows directory, and renamed to PHP.ini, the general official release of the website of the server with Php.ini-dist, and as a debugging server with PHP . ini-recommended better. Of course, under normal circumstances, this php.ini still need to be modified according to the actual situation.
Copy the three files Php5ts.dll, Libmysql.dll, Libmcrypt.dll in the c:php directory to the C:windowssystem32 directory
The php.ini file begins with a semicolon-open extension, a semicolon-free extension, and it is recommended to open the following several common applications:
The code is as follows Copy Code
Extension=php_mbstring.dll
Extension=php_gd2.dll
Extension=php_mcrypt.dll
Extension=php_msql.dll
Configuring IIS

Open Internet Information Services (IIS) Manager, open the Web site-> Properties-> ISAPI Filter-> Add, filter name to fill in "PHP", and the executable file still chooses C:phpsapiphp5isapi.dll.

Open the Web site-> Properties-> The home directory-> application settings-> configuration-> Application Extensions-> Add, or choose C:phpsapiphp5isapi.dll for the executable file. The extension is filled with ". PHP" and the action is limited to "head,get,post".

You can add index.php as the default content document by opening the Web site-> Properties-> document-> enable default content document-> Add.

Then select the server machine name-> "All Tasks"-> "Restart IIS" to restart IIS.
Verifying the PHP environment
Create a index.php under the Web root directory of IIS, which reads:
The code is as follows Copy Code
<?php
Phpinfo ();
?>
In the browser input localhost, or native IP open index.php, to see if the PHP environment is properly built to complete.
The following figure is my authentication information

The PHP runtime environment in this Windows IIS environment has been built, but the MySQL database support needs to be configured

Then let's take a look at configuring MySQL

The introduction of IIS under the environment of PHP construction, with the support of PHP also need to have a MySQL database support to really play the real role of PHP, here on the MySQL database under Windows installation and configuration process.

First download MySQL installation package: http://www.mysql.com, I use the Mysql-5.1.23-rc-win32 version here

1-click MySQL installation package

2 The default is typical, if you want to modify the installation path can also choose Custom.
Note: Install MySQL in the path, can not contain Chinese!

3 Click Intall Start Installation

4 Skip Registration

5 Do you want to configure MySQL now? You can also configure it later in the Configuration Wizard of the Start menu.
Here is the configuration now

6 Select detailed Configuration (Details set), click Next to continue

7 The option below is to choose what type of MySQL is applied to, the first is the development of the server, will only use as little memory, the second is a normal Web server, will use a medium amount of memory, the last one is the server running only MySQL database, will occupy all the memory. Users can according to their own needs, Select the option. Here only select Sever Machine, click Next to continue

8 The following is the choice of database uses, the first is multi-purpose use,

9 Below is the choice of INNODDB data storage location, generally default well, do not need to change

10 The following is the choice of MySQL allowed maximum number of connections, the first is the largest 20 connection concurrent number, the second is the maximum of 500 concurrent connections, the last one is custom, you can choose according to your own needs.
Here Select the first

11 below is whether to run the network link. Select the check box here. Database listening port, the general default is 3306, if you change to other ports, later connect to the database to remember the modified port, otherwise can not connect MySQL database, more trouble, here do not make changes, Default port with MYSQ: 3306

12 This step sets the default encoding for MySQL, which defaults to latin1 and standard encoding. The second is UTF8, and the third is manual. The encoding is introduced in version 4.1. If you want to use the data from the original database, it's best to determine what encoding the original database is in. If the encoding set here is inconsistent with the original database data encoding, it may appear garbled when used. Recommended Latin1 standard encoding

Of course, if we need to, we can also modify its encoding (not recommended).

13 This step is to set MySQL as a Windows service, generally choose to set up a service, so that the MySQL database can be started and closed through the service later. Recommended: The following check box is also checked, so that, in cmd mode, You do not have to execute commands under the MySQL Bin directory. Consulting at the command line can execute file

14 This step is to set MySQL superuser password, this super user is very important, the MySQL has all the permissions, please set and remember the Superuser password, the following checkbox is to create an anonymous account, which will make the database system is not secure.
If there is such a demand, please tick.

15 Click Execute to install

16 Click Finish finishes installation

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.