Build Iis8+php+mysql+phpmyadmin on Win8

Source: Internet
Author: User
Tags configuration php php and php and mysql vc9 win32 phpmyadmin

Brief introduction

This article uses a graphic tutorial to teach you to install configuration IIS8 in Win8, and to build a running environment that supports PHP and MySQL, and finally manages the MySQL database using phpMyAdmin.

Background

All along, the site debugging work is directly on the site of the host server completed, equivalent to direct online debugging, and did not test on-line in the local, this is not very good, inconvenience to the user experience. So today, while just loaded Win8, decided to build an ultra-cool experience network operating environment in this machine.

Details 1, installation IIS8

(1) Go to Control Panel >> programs and features >> enable or disable Windows features

(2) Find Internet Information Service, because to support PHP, so remember to select the CGI in the application development function, in order to support as many languages, I have chosen all

When you click OK, you will be prompted to download the update file online. Note: The previous installation of IIS can be installed on the installation CD, but WIN8 can only be installed on the network, so select "Download files from Windows Update" and the system will automatically download the required updates and wait for the download installation to complete.

(3) After the installation is complete test IIS8 is installed successfully, in the browser input http://localhost will appear the following interface, otherwise the installation is unsuccessful.

2, download the installation configuration PHP environment

(1) Download PHP, you can go to the official website to download the latest version of the PHP program, website address: http://windows.php.net/download/

I downloaded the php-5.4.9-nts-win32-vc9-x86.zip, Release notes:

1. This is the PHP installation package, simply download this does not enable PHP to run, but also requires the server (IIS, Apache, etc.) support.  2. This version of the installation package is NTS, which is a non-linear security version and is generally recommended to be installed on the fastcgi for better operation.  3. Win32 points out that this is a 32-bit Windows platform run.  4. VC9 Tip This is compiled with the visual Studio 2008 compiler, it is generally recommended to use an IIS server to build (VC6 's recommendation to use Apache). 5. X86 prompts this version to run on the X86 architecture system.

2) unzip the downloaded zip archive into any directory and unzip it to the E:\PHP\PHP5 directory;

(3) Configure PHP: Copy E:\php\php5\php.ini-development to desktop and rename to PHP.ini

Open the php.ini on your desktop and use Ctrl+f to search for related fields and modify them as described below:

1) Modify the current time zone Date.timezone = "Asia/shanghai", take care to remove the preceding semicolon ";"

2) Activate the extension option you need, the semicolon ";" before the corresponding DLL statement. Delete

Extension=php_gd2.dll Extension=php_mbstring.dll Extension=php_mysql.dll Extension=php_mysqli.dll extension=php_ Pdo_mysql.dll

3) Set the path of the extension DLL Extension_dir = "E:\php\php5\ext\", take care to remove the preceding semicolon ";"

4) Save the changes and copy the php.ini to the C:\windows directory

Description: Due to the Win8 permissions issue, the php.ini was not copied here for modification.

3. Configure IIS to support PHP

(1) Access Control Panel >> Administrative Tools >>internet Information Services (IIS) Manager

2) Middle Window Select "Handler mapping" double-click, then right-most select "Add Module Map"

(3) Select "Fastcgimodule" at the module and select "E:\php\php5\php-cgi.exe" in the executable file.

(4) Add default documents to the website: default.php and index.php

(5) test the PHP environment

Create a new index.php file under the established Site directory (note that index.php, not index.php.txt), the content is "<?php phpinfo (); > "and then open" localhost "in the browser, you can see a similar interface like this:

4. Install and configure MySQL database

(1) Download mysql:http://dev.mysql.com/downloads/

MySQL installation is relatively simple, according to the Installation wizard completed, here is not introduced, the following describes how to configure the instance.

(2) Configuring the MySQL server instance

This will install the MySQL configuration.

Modify the local Web site URL

C:\Windows\System32\drivers\etc

(3) In order for PHP to load into the MySQL extension, you need to copy the C:\Program Files\mysql\mysql Server 5.5\lib\libmysql.dll to the C:\WINDOWS\SYSTEM32 directory

Note: This step is important because Extension=php_mysqli.dll is activated when PHP.ini is configured above, which requires libmysql.dll support. Otherwise mysqli will fail to activate, which will also affect the use of phpmyadmin.

This step requires restarting the IIS server and entering "Iisreset/restart" on the command line

5. Installation Configuration phpMyAdmin

phpMyAdmin is a web tool that is based on a PHP environment to manage the MySQL database, and if phpMyAdmin can run successfully, then the installation configuration you iis+php+mysql in front of you is completely correct.

(1) Download phpMyAdmin

(2) Unzip the phpmyadmin-3.5.2.2-all-languages_3.5.2.2.zip into the E:\php\phpMyAdmin

(3) Create a virtual directory in IIS php points to E:\php\phpMyAdmin.

6, test phpMyAdmin, done

Open Browser Input http://localhost/php if the following interface appears, the instructions are done.

Login now to manage MySQL database.

In phpMyAdmin, you can perform various operations on the database and experience it yourself.

Conclusion

This article is a complete tutorial, from the installation configuration of IIS, the installation configuration of the PHP environment, the installation configuration of the MySQL database and the installation configuration and operation of the last phpMyAdmin, and I hope you can understand the relationship between them from the installation process.

The above steps are recorded at the time of the construction, absolutely real available. You can try it, too.

Description: The above method can also be applied to Win7, the installation method is similar, we can try.

Build Iis8+php+mysql+phpmyadmin on Win8

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.