Windows xp iis PhP5 detailed configuration

Source: Internet
Author: User
Tags mysql client phpinfo mysql command line

Windows xp iis PhP5 detailed configuration
 
 
I. Software preparation: The following are the latest official versions as of May 20 ,.
PHP (5.1.2): http://www.php.net
MySQL (5.0.19): http://www.mysql.com
Zend optimizer (2.6.2): http://www.zend.com
PhpMyAdmin (2.8.0.2): http://www.phpmyadmin.net
Suppose C:/is the system disk of your current operating system. If your current operating system is not installed in C:/, modify it on your own.

 

Ii. install PHP:
1. Download To Get The php-5.1.2-Win32.zip, decompress to C:/PHP (this path can be arbitrary, but if the following uses this path, Please modify the corresponding );

2. Copy C:/PHP/libmysql. dll and C:/inetpub/PHP/EXT/php_mysql.dll to C:/Windows/system32;

3. Copy C:/PHP. ini-Dist to C:/Windows (C:/winnt in Windows 2000) and rename it PHP. ini;

4. open it in notepad and use the search function of notepad to search: extension_dir = "C:/PHP/EXT". The path is directed to the extensions directory under your PHP Directory, for example: extension_dir = "C:/inetpub/PHP/EXT ";

5. Search; Windows extensions and open only the required modules to save memory (remove the number before each module ):
Extension = php_gd2.dll
GD library support. If this module is not enabled, discuz! Forum image watermarks cannot be used.

Extension = php_mbstring.dll
To support phpMyAdmin, open mbstring.

Extension = php_mysql.dll
Needless to say, MySQL is supported.

 

3. Configure IIS to support PHP
Make sure that IIS is correctly installed in the system. If IIS is not installed, install IIS first. The CGI and ISAPI modes are supported when PHP and IIS are integrated. The ISAPI mode is recommended. Here, we will only describe how to install ISAPI:
1. in "Control Panel", select "Internet Service Manager" in "Administrative Tools", open IIS, stop services, and right-click "default website" on the left and select "properties ", in the "ISAPI filter" tab in the "web site properties" window, find and click "add, in the pop-up "Filter Properties" window, enter :. PHP, and then point the executable file to php5isapi. dll path, for example, C:/PHP/php5isapi. DLL.

2. open the "home directory" tab in the "web site properties" window, find and click "configuration", find and click "add" in the "Application configuration" window that appears, in the displayed window, add a new extension ing with the extension. PHP, Click Browse to point the executable file to php5isapi. dll path, for example, C:/PHP/php5isapi. DLL, and then click OK.

Note: Enter ". php" in the extension, instead of Directly Writing "php"

3. Open the "document" tab in the "web site properties" window, find and click "add" to add the index. php item to the default web site startup document list. You can raise index. php to the highest priority, so that the index. php document is automatically searched and opened when you visit the site.

4. Select "Pure script" in the application settings and execution licenses of the web directory, close the Internet Information Service Manager, and execute the following command at the command prompt:
Net stop w3svc
Net stop IISADMIN
Net start w3svc
Restart IIS.

5. Open the browser and enter http: // localhost/. After the successful page is displayed, create a new phpinfo. php file in the IIS root directory. The content is as follows:
<? PHP
Phpinfo ();
?>
Open your browser and enter http: // localhost/phpinfo. php. All the information about PhP supported by the current server is displayed. The Server API mode is ISAPI.

 

4. Install MySQL
1. Download Windows essentials (x86) and double-click it. Install C:/MySQL here. During the installation process, you will be prompted if you want to configure it immediately. Select No to complete the installation. After the installation is complete, enter C:/MySQL/bin/mysqld-NT-install in "run" in the "Start" menu. After the installation is successful, enter "net MySQL start, the MySQL service will be started. If you want to configure MySql in detail, go to the C:/MySQL/bin directory, run mysqlinstanceconfig.exe, and follow the prompts. If you download windows (x86), unzip the package and double-click to execute setup.exe. The steps are the same as above. If you download without Installer (unzip in C:/), decompress the package to C:/MySQL, and enter C: /MySQL/bin/mysqld-nt.exe, run successfully and then enter: Net MySQL start, you can start the MySQL service.

2. set a password for MySQL to ensure security. Generally, the Configuration Wizard MySQL server instance config wizar is provided in the menu. After running the command, follow the steps below to configure and set the root password. We recommend that you set the complexity of the root password, ensure server security! You can also use the command configuration in the MySQL command line client:
First, open the DOS window, enter the directory mysqlbin, then type the command mysql-uroot-P, and press enter to prompt you to enter the password. If you have just installed MySQL, super User Root has no password, so press enter to enter mysql. The MySQL prompt is: mysql>
Change the password.
Format: mysqladmin-u username-P old Password New Password
For example, add the password xqin.com to the root user and enter mysqlbin in the DOS directory. Then, enter the following command: mysqladmin-uroot-Password xqin.com
Note: because the root account does not have a password at the beginning, the old-P password can be omitted.
Then execute:
Set password for 'root' @ 'localhost' = old_password ('xqin. com ');
The command here is because the password hash algorithm used by MySQL 4.1 and later version verification protocols is incompatible with the old client. You will also be prompted to log on with the correct password in phpMyAdmin:
Client does not support Authentication Protocol requested
By server; consider upgrading MYSQL client
This is to prepare for the correct use of phpMyAdmin, so that the root password is set to xqin.com.

 

5. Install Zend Optimizer
Download To Get The ZendOptimizer-2.6.2-Windows-i386.exe, directly double-click the installation, installation process you want to select Web server, select IIS, and then prompt you whether restart web server, select Yes, before the completion of installation prompt whether to back up PHP. INI, click OK and the installation is complete.

 

6. Install phpMyAdmin:
Download the phpMyAdmin-2.8.0.2.zip, decompress it to the site root directory, find./libraties/config. Default. php and copy it to the phpMyAdmin root directory named config. Inc. php, and make the following changes:
Search for $ cfg ['pmaabsoluteuri '] and set your phpMyAdmin URL, for example, $ cfg ['pmaabsoluteuri'] = 'HTTP: // localhost/PHPmyAdmin /'; note that phpMyAdmin is in the root directory of the default site.

Search for $ cfg ['blowfish _ secret ']. After setting the root password, enter the root password xqin.com as $ cfg ['blowfish _ secret'] = 'xqin. com ';

Search for $ cfg ['defaultlang '] and set it to a zh-gb2312;

Search for $ cfg ['defaultcharset'] and set it to gb2312;

Search for $ cfg ['servers'] [$ I] ['auth _ type']. The default value is config. It is insecure and is not recommended. Cookie is recommended, set it to $ cfg ['servers'] [$ I] ['auth _ type'] = 'cooker ';
Note that if config is set here, set the user name and password below! For example:
$ Cfg ['servers'] [$ I] ['user'] = 'root'; // MySQL user ----- connect to a user in MySQL
$ Cfg ['servers'] [$ I] ['Password'] = 'xqin. com ';
 
 
 

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.