How to install and configure IIS + PHP + MYSQL

Source: Internet
Author: User

1. install php
1) Create a New PHP folder on the D Drive and decompress php-5.2.0-win32.zip to D: \ PHP.
2) Find the PHP. ini-dist file in the D: \ php folder and copy it for backup. Rename the copied file to php-ini.
3) in the php. ini file, find the following line: extension_dir = "./" (Note: This line specifies the PHP extension search location) and edit this line, as shown below:
Extension_dir = "D:/PHP/ext" (Note: Do not use a slash (/) instead of a backslash \).
4) in php. in the INI file, find the following line:; extension = php_mysql.dll (Note: The semicolon starting from this line indicates PHP to ignore this line), delete the semicolon starting from this line to enable extended extension = php_mysql.dll ;; extension = php_mbstring.dll to extension = php_mbstring.dll
5) Save and close the php. ini file. Copy the modified php. ini file to the C: \ Windows \ folder;
6) in the D: \ PHP \ folder, find 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.
Ii. install and configure IIS
1) Select Add/delete programs in the control panel, and then select Add/delete windows Components in the pop-up dialog box to 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) create a virtual directory under the default website, where you can store your php files. For example, you can create a new virtual directory. php points to the D: \ phpamdin directory on the computer. Right-click the PHP folder, select "properties", and click "configuration" on the "virtual directory" tab to open the application configuration dialog box.
4) Click "add" on the "ing" tab to open the "Add/edit application extension ing" dialog box, click "Browse" after "executable file", and locate D: \ PHP \ php5isapi. dll, enter "in the text box after" extension ". php "(Note: Pay attention to the period before the extension), click OK.
5) on the Documents tab, add index. php as the default document. Or not.
6) Click "OK" to exit the "Application configuration" dialog box, and click "OK" to exit the PHP Properties dialog box.
So far, IIS configuration is complete.
Some configurations may require restarting the server: run the following command in cmd:
Net stop w3svc
Net start w3svc
Iii. Test PHP installation
1) under D: \ phpamdin (this directory sets the virtual directory as php When configuring IIS), create a notepad file and open it. Enter the following code: Copy codeThe Code is as follows: <? Php
Phpinfo ();
?>

Save the code in this section as version. php (the suffix name must be php ).
2) Open the browser and enter localhost/php/version. php in the address bar. If the display is normal, PHP is successfully installed.
4. Install MYSQL
1. Create a folder named mysqlon the D Drive and decompress the downloaded mysql-noinstall-5.0.22-win32.zip file to D: \ mysql.
2) Run mysqld-nt.exe under D: \ mysql \ bin. a dos screen will flash through. In this way, the mysql service is started.
3) switch the directory to D: \ mysql \ bin under the command line, type mysql-u root-p and press Enter. If Enter password: is displayed, mysql is successfully installed. The default password is null.
5. Install PHPMyAdmin
1. Decompress all the content in the downloaded phpmyadmin-2.9.1.1-all-languages.zip file to the D: \ phpadmin directory created during IIS configuration.
(: Http://www.phpmyadmin.net/home_page/downloads.php)
2) Start the browser to ensure that IIS and Mysql services are running. Enter http: // localhost/php/index. php to view the phpMyAdmin management screen.
Server related software download http://s.jb51.net you can refer.

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.