I. Software Download
1. Download the Installation File of apache2 from www.apache.org.
Reference: http://mirror.apache.or.kr/httpd/binaries/win32/apache_2.0.55-win32-x86-no_ssl.exe
2. Download the PhP4 zip package from www.php.net.
Reference: http://cn.php.net/get/php-4.4.6-Win32.zip/from/a/mirror
Note: (1) PhP5 is stable, but PhP4 is a good choice because many PHP applications are not compatible with PhP5. (2) PhP4 has an EXE Installation File in windows, but that version is a miniature version, which is incomplete. Therefore, we recommend you download the zip package, but you need to install it manually.
3. Download mysql5 from www.mysql.com
Reference: http://dev.mysql.com/downloads/mysql/5.0.html
4. Download phpMyAdmin for MySQL operations
Reference link: http://count.skycn.com/softdownload.php? Id = 10687 & url = http://gztt.driversky.com/down/phpMyAdmin-2.7.0.zip
Ii. installation and configuration
1. the installation of Apache and MySQL is relatively simple. It is not much different from the installation of General Windows programs. Follow the default options to proceed step by step. Note that it is best to modify the installation path, do not be too long or contain spaces. For example, if you select D:/when installing Apache, the root after installation is D:/apache2.
The installation path of MySQL can be D:/mysql50. After installation, enter D:/mysql50/bin and run mysqld-NT -- install to install MYSQL as the system service. (Mysqld-NT -- remove is to uninstall the Service)
After apache2 is installed, open D:/apache2/CONF/httpd. conf, find the loadmodule, and add
# SSS added (this sentence is a comment)
Loadmodule php4_module "D:/PhP4/php4apache2. dll"
Addtype application/X-httpd-PHP. php
Phpinidir "D:/PhP4"
Save and exit.
2. php:
(1) decompress the zip package to D:/PhP4, and copy the DLL files in the DLLs and SAPI directories to its parent directory, that is, D:/PhP4.
(2) Set PHP. ini-dist (default PHP setting) or PHP. ini-recommended (recommended for PHP) is copied to the/Windows Directory (some are WINNT, depending on the system installation) and renamed to PhP. ini.
(3) Copy php4ts. DLL to the/Windows/system32 directory.
(4) add D/: PhP4 to the path of the system variable in the environment variable. (Add them to the end and separate them with semicolons)
3. Decompress phpMyAdmin to D:/apache2/htdocs/phpMyAdmin.
Iii. Running services
1. Run MYSQL: Type Net start MySQL)
2. run Apache: Choose Start> program> Apache HTTP Server 2.0.55> Control Apache Server> monitor Apache servers. A red feather icon appears in the lower right corner of the taskbar, right-click Open Apache monitor and click Start. If any configuration is incorrect, an error message is displayed. Otherwise, the word "The apache2 server is starting" is displayed in the lower left corner of the window.
Iv. Test Results
1. Open the browser and enter http: // localhost. A default homepage is displayed normally.
2. Open notepad and enter the following content:
<HTML>
<Head>
<Title>
Hello
</Title>
</Head>
<? PHP echo "Hello! PHP ";?>
</Body>
</Html>
Save the file named test. php to D:/apache2/htdocs /.
Open the browser and enter http: // localhost/test. php. If Hello! is displayed! PHP indicates that PHP is successfully installed.
3. Enter http: // localhost/PHPmyAdmin/index. php. The phpMyAdmin homepage is displayed normally.
Note: If the port number is not the default 80, but 8080, you must change localhost to localhost: 8080.