IIS + PHP + MYSQL environment configuration _ MySQL

Source: Internet
Author: User
Configure ingress in the IIS + PHP + MYSQL environment. The three files can be searched by Baidu.


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, to 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:

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 new file named mysqlon the D drive and decompress the downloaded mysql-noinstall-5.0.22-win32.zip to D:/mysql.

2) run "D:/mysql/Bind" mysqld-nt.exe. a dos screen will flash through. In this way, the mysql service is started.

3) switch the directory to D:/mysql/bin in 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.

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.

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.