Configuration of ASP+MySQL+PHP+ISAPI_Rewrite+Zend+Xcache under Windows 2003 IIS 6.0

Time:2019-9-11

Windows 2003, buy it by yourself.

Install IIS6.0:
After installing the system, in Control Panel – > Add or Delete Programs – > Add/Delete Windows Components – > Double-click Application Server – > and then select Internet Information Services (IIS) – > Determine – > Installation is complete.

Download PHP: http://cn2.php.net/get/php-5.2.5-Win32.zip/from/this/mirror

Download MySQL: http://dev.mysql.com/get/Downloa… p/from/pick#mirrors
According to their own speed, click on the HTTP / FTP link at the back of the following country to download.

Download Zend Optimizer: http://www.zend.com/en/products/guard/downloads
I downloaded version 3.3.3 by myself.

Download Xcache: http://xcache.lighttpd.net/wiki/Release-1.2.2

Many people may not know what Xcache is. Here’s a brief introduction.

XCache is a new PHP buffer. After testing by myself, the effect of XCache on Windows is much better than that of similar software.

The actual test results are as follows (non-scientific method):

Average execution time of original web page: 0.13 seconds
Average page execution time after acceleration: 0.03 seconds
The original CPU occupancy: 15% – 60%.
CPU occupancy after acceleration: 3% – 30%.

As can be seen from the above data, using this accelerator can greatly reduce CPU usage (but will cause more memory usage) and shorten the page execution time.

Because the support of other similar software for Windows is not good enough, XCache is the best choice for Windows host.
[separator]
MySQL + PHP environment has been configured. To see the configuration of XCache, please move to the successful configuration methods and troubleshooting of XCache in Win2003 and IIS6.

Download ISAPI_Rewrite…()

Click to download

It can also be downloaded officially: http://www.isapirewrite.com/download/isapi_rwl_0049.msi

II. Configuring System Environment

1. Install and configure MySQL
Unzip MYSQL and run it directly.

Select Custom to customize the installation, as shown in the following figure:

Click “Change” to change the MySQL installation directory (if necessary), as shown in the following figure:

After the file copy and installation is completed, proceed with the MySQL setup interface and click “Finish”. As shown in the following figure:

Select “Detailed Configuration” for detailed configuration, as shown in the following figure:

Select the MySQL mode of operation as “Server Machine: as shown in the following figure:

Select the default storage mode of MySQL database as “Non-Trans Only (MYISAM)” as shown in the following figure:

Set the maximum number of MySQL connections: usually set to an integer between 128 and 512. As shown in the following figure:

Set MySQL network parameters. Note: Do not enable Strict Mode. As shown in the following figure:

Set the default character set of MySQL to the user site language, such as utf8 for version 2.1 of Bo-Blog, then select utf8 for the database, as shown in the following figure:

Windows environment settings. The first item is the name of the service startup. The check box below asks if the service will run automatically. The “Include Bin Directory in Windows PATH” below indicates whether to insert MySql’s path into the system variable. Generally, select it. As shown in the following figure:

Modify the setting of root user password. Note: Do not select Create An Anonymous Account. This option is whether to start anonymous remote connection mode. It is very insecure for database to use this mode, as shown in the following figure:

Complete the installation of MySQL and start the MySQL service. As shown in the following figure:

2. Testing MySQL

Open the “Start” menu – > Select “Run” – > Enter “cmd” – > and then enter “MySQL – U root – p” – > in the pop-up CMD form into the password set in the MySQL configuration process. If shown as follows, MySQL is configured correctly…
Quote:

Welcome to the MySQL monitor.  Commands end with ; or /g.
Your MySQL connection id is 8352
Server version: 5.0.51a-community-nt MySQL Community Edition (GPL)

Type ‘help;’ or ‘/h’ for help. Type ‘/c’ to clear the buffer.

mysql>


3. Add PHP to environment variables

Unzip php, this example is to decompress to “D:/php”…

Right-click “mine”Computer “->” Properties “-> Select” Advanced “Label – > Click” Environment Variables “-> Click below” System Variables “List”ATH “-> click the edit”-> below to add “-> at the end of” variable value “; D:/php”(decompression path of php, don’t forget to add first”;”number) – > confirm – > click”edit”button before button”to create a new”button – > after input”variable name.HPRC “->” variable value “input” D:/PHP”(decompression path of PHP) – > click” to confirm “complete;”

4. Modify the php.ini configuration file

Enter the “D:/php” folder and rename “php.ini-dist” to php.ini

Click on the Start menu – > Select Run – > Enter php.ini – > Determine – > Open php.ini. (This is to test whether the environment variable is set correctly, of course, you can double-click php.ini to open the file……………………

Then search “extension_dir” to find extension_dir = “. /” and change it to extension_dir = ext. (If you are afraid of configuration errors, you can directly point “start” – > “run” – > enter “ext” – > make sure that if you open a folder full of. dll, it proves that “environment variables” are configured correctly.)

Search for “Windows Extensions”

In the dynamic module configuration under Windows Extensions, you need to turn on the following module supportRemove the “;” number at the front of each line of the module configuration and copy the content to the clipboard code:extension=php_mbstring.dll
extension=php_gd2.dll
extension=php_MySQL.dll

Advanced users (familiar with PHP functions) are recommended to search for “disable_functions=” and add prohibited PHP functions, such as “shell_exec”, “exec”, “scandir” and so on, after which general users can leave blank.

5. Establishing a website

Click “Start” – > Select “Run” – > Enter “inetmgr” (or open the “Control Panel” – > Select “Management Tools” – > Select “Internet Information Service (IIS) Manager”) to start IIS Manager, expand the tree directory on the left, right-click “Website” – > Select “New” to build a website (or virtual host), as shown in the following figure:

Enter the name of the website as the identification in IIS, you can enter it at will, as shown in the following figure:

The IP address of the website need not be filled in. If there is no special requirement, the port can be maintained as “80”. Finally, the domain name of the website should be correctly entered under “Host Header of the website”, as shown in the following figure:

Create a directory in the hard disk partition and specify that the recommended website should be placed in a separate partition (for example, “E:/wwroot/web” is the site storage directory), and determine that “Allow anonymous access to the website” under the path is selected.

For PHP applications, you need to give the site permission to “read” and “run scripts.” As shown in the following figure:

So far, a new site has been successfully built, as shown in the following figure: