Installation preparation:
Download the Apache installation file (http://httpd.apache.org/download.cgi) and select the apache_2.2.11-win32-x86-no_ssl.msi version.
Download PHP (http://www.php.net/downloads.php) and select PHP 5.2.9-1 zip package version.
Installation steps:
1. install Apache to the specified directory, for example, "d: \ environment \ apache2.2 \".
2. Decompress PHP to the appropriate directory, such as "D: \ environment \ php-5.2.9-1-Win32 \".
3. PHP configuration: copy the php. ini-recommended file under the PHP installation directory and rename it PHP. ini.
4. Configure Apache and modify the D: \ environment \ apache2.2 \ conf \ httpd. conf file:
Locate loadmodule and add the following two lines at the end.
Loadmodule php5_module "D:/environment/php-5.2.9-1-Win32/php5apache2_2.dll"
Phpinidir "D:/environment/php-5.2.9-1-Win32"
Find AddType application/x-gzip. gz. tgz and add a line to the end.
AddType application/x-httpd-php. php
5. Test. After restarting apache, write an index. php file and put it in the following content:
<? Php phpinfo ();?>
Enter http: // 127.0.0.1/index. php In the browser to check whether the php environment information can be properly displayed. If you cannot view the apache Error Log, find the corresponding solution.