1. Download apache_2.2.8-win32-x86-no_ssl (1).msi, php-5.2.5-Win32.zip. Link:
2. Create the following directory: be careful not to use spaces
F:apache
3. Install apache. After the installation is completed, enter 127.0.01 in the browser, and it will prompt that it works, indicating that the installation is successful. Note that iis must be uninstalled before installation
F:apacheApache2.2
4. Unzip php to
F:apachephp
5. Rename F:apachephpphp.ini-dist to F:apachephpphp.ini
6. Open F:apachephpphp.ini. Find the line where the string: extension=php_gd2.dll is located (line 611), and remove the semicolon at the beginning of the line. In the next few lines, find the line where the modules listed in the table below are located, and also remove the preceding semicolon.
extension=php_gd2.dll
extension=php_mbstring.dll
extension=php_mhash.dll
extension=php_mime_magic.dll
extension=php_ming.dll
extension=php_mysql.dll
7. Add F:apachephp and F:apachephpext to the system environment variables
8. Create a first.php file under F:apacheApache2.2htdocs. The content of the file is as follows
9. Enter http://127.0.0.1/first.php in the browser. It is found that the html source code is displayed. So open F:apacheApache2.2confhttpd.conf.
On line 125 (find these two sentences #LoadModule version_module modules/mod_version.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so Add the following two sentences to these two sentences)
1.
LoadModule php5_module "F:/apache/php/php5apache2_2.dll"
PHPIniDir "F:/apache/php/"
2. Add a line at line 383
AddType application/x-httpd-php .php
10. Restart the php server. Enter http://127.0.0.1/first.php in the browser. helloWorld appears. Success