Original: http://www.chinaz.com/web/2012/0516/252021.shtml
With the popularity of the PHP website, more and more domestic webmasters use PHP to develop Web sites or use the relevant PHP open source sites (such as: Dedecms, Phpwind, Hong Sing discuz!, WordPress and other popular open source sites), For some people who are just beginning to get in touch with the PHP language or are just starting to build their own site, it's important to test the PHP site locally, because it allows you to do some debugging locally without worrying about network problems and operator problems.
Next, the author will WindowsXP (SP3), build and configure the PHP operating environment to do a simple introduction:
1. Installation Preparation
1.1Apache Download, official address (http://httpd.apache.org/), here i download version of Apache HTTP Server 2.2.22, using the OpenSSL version (Httpd-2.2.22-win32-x86-openssl-0.9.8t.msi),
1.2PHP Download, official address (HTTP/www.php.net), download here is PHP5 (php-5.2.17-win32-vc6-x86)
1.3Mysql Download, official address (http://www.mysql.com/downloads/), used here is MYSQL5 (mysql-essential-5.1.57-win32.zip)
2. Installing Apache HTTP Server
2.1 Run the download good "Httpd-2.2.22-win32-x86-openssl-0.9.8t.msi" file, the following installation interface appears,
In the red box is the Apache version number, we directly click "Next" to enter the next step;
The Software Installation license regulation appears, where you directly select the "I accept the terms in the license Agreement"; then click "Next";
The dialog box shows the software related instructions (if you are very patient when you install the software, you can consider reading it again to see how your English level is), here we directly click "Next";
Here is to fill in the information about the service, Network domain this is to fill in your domain name (such as: xxx.com); Server name this entry fill in your server names (such as: www.xxx.com); Administrator's email address this is a fill in the administrator's e-mail addresses, in the local configuration, the above three columns can be filled, effective invalid can be. The following 2 options, the first one is for all users of the system to install, use 80 port, the second is to install only for the current user, use 8080 port; generally we default to the first, and then click "Next";
This step is to let you choose 2 types of installation mode, "Typical" is the Classic mode, also is the default installation mode, "Custom" is a custom installation, you can choose the installation path and some of the features of the software selection; I choose "Custom" here;
We talk about the software here, so the function is selected, and modified the installation location of the software, the author here in the E-drive in a directory, you can also choose to the directory you want to install;
Ready to install, click "Next" here;
No need to operate here, wait for a moment;
Finish, click "Finish" to complete the installation.
The Apache icon appears in the status bar on the right side of your computer's taskbar.
Indicates that the Apache service is already running;
At this point, we can enter http://127.0.0.1 access in the browser address bar, the browser displays the text "It works! ", indicating that the service is in good condition.
2.2 Next to the Apache server for some simple configuration, first we open the Apache configuration file from the program,
Click to pop up a notepad document
Here we want to configure the location of the site files, that is, the site root directory, the default is in the Apache installation file "Htdocs", the default location is "E:/webdev/apache2.2/htdocs"; We talk about the site's root directory in a convenient location, click the Notepad search option, find "DocumentRoot", check the display information:
Note: related website Construction Skills Read please step to the building station tutorial channel.