The installation method for this article is available for Apache+php+mysql installations under Windows XP and also for installation and configuration under Windows 2003 systems.
1. Installation Environment
The operating system is the Chinese version of Windows XP, Apache, PHP, MySQL, the latest version is up to 2007.09.07, respectively, downloaded on its website:
* Apache 2.2.6:http://apache.mirror.111cn.net/httpd/binaries/win32/
* PHP 5.2.4 (Windows Binaries PHP 5.2.4 Zip package): http://www.php.net/downloads.php
* MySQL 5.0.45 windonws:http://dev.mysql tutorial. com/downloads/
2. Installed directory structure planning
In order to facilitate maintenance, the Server software can be installed in the system disk (C disk) and its own files to the other disk, so for future maintenance is very important.
3. Install Apache 2.2.6 under Windows XP
Installation under Windows XP
1. Run Apache 2.2.6 installation program, follow the prompts all the way Next. In the server information network domain, the server name field just fill in a domain name, such as Php.com, and then follow the prompts all the way through Next.
2. At the end of the installation, a DOS window pops up and disappears, which is the system Apache is automatically started.
4. Install PHP 5.2.4 under Windows XP
1. Download the PHP 5 zip package directly, I will directly extract the PHP 5.2.4 zip file to the d:php directory below. Installing PHP does not recommend using the Win32 Installer (mainly for later installation expansion trouble).
2. In the Explorer into the installation directory of PHP, the php.ini-dist or php.ini-recommended copy, named PHP.ini. Then open the php.ini.
; Extension=php_mysql.dll
To be in front of; The number is removed and changed into:
Change it to the absolute path of the EXT subdirectory under your PHP installation directory. For example, my:
Extension_dir = "d:/php/ext/"
This step is very important. Otherwise, PHP will not be able to find the Php_mysql.dll module, can not load.
5. In the "Control Panel"-> "System"-> "advanced"-> "environment variable", find path in "System variables", edit the variable value of path, add your PHP directory d:php, must be preceded by a semicolon (;) separate it from the previous value.
5. Configure Apache and PHP
Open the httpd.conf file in the Conf subdirectory under the Apache installation directory.
1. Find:
Change to a directory of your local Web site content. For example, my:
After the change, a little pull down, find "# This should is changed to whatever your set DocumentRoot to." And then put this place down here.
2. Find LoadModule, according to your PHP installation directory, in the space below add these two lines:
LoadModule php5_module "D:/php/php5apache2_2.dll"
Phpinidir "d:/php" This do not, lest the Apache server could not start
DirectoryIndex index.html
DirectoryIndex index.php index.html
AddType application/x-gzip. GZ tgz
AddType application/x-httpd-php. php
AddType application/x-httpd-php. html
5. Save httpd.conf
6. In your site directory (such as mine is e:/web/), manually create a index.php file, content:
7. Start the Apache service in a DOS window (assuming Apache is installed in the C:Program Filesapache Software FoundationApache2.2)
#如果之前启动了, stop it first
C:Program Filesapache Software foundationapache2.2bin> httpd-k Stop
Or: net stop apache2.2
#启动 APAHCE Service
C:Program Filesapache Software foundationapache2.2bin> httpd-k start
Or is: net start apache2.2
8. Open http://localhost/index.php, you can see the test output results.
6. Install MySQL 5.0.45 under Windows XP
MySQL is simple to install, it provides a Win32 installation package. After downloading according to the prompts to install, you can also select the type of installation Custom, specify the installation directory, where the default installed in the C disk.
After the installation is completed, you will ask if you want to register on the website, skip it. You will then ask if you Configure the MySQL Server now, select and continue, and then follow the prompts to set the character set and the root administrator's password.