1. install Apache 2.2
Download the apache_2.2.3-win32-x86-no_ssl on the Apache official website, double-click the installation, it is best not to install a space path can be installed under C:/apache2.2.
Start Apache and enter http: // localhost in IE. If it works is displayed on a page! Apaceh is running normally.
2. install PHP 5.2
2.1.download php-5.2.0-win32.zip to the official PHP website, decompress the package, change the directory name to PhP5, and copy it to C :/
Put php In the PhP5 directory. ini-Dist is renamed as PHP. copy INI to C:/Windows (or:/winnt depends on the operating system) and set php5ts. DLL and libmysql. DLL to C:/Windows/system32.
2.2. Find extension_dir and add:
Extension_dir = "extension_dir =" C:/PHP/EXT "" // The ext folder in the php5.0 installation directory is used to locate the DLL file
Select some common php dll files in the extension area:
Extension = php_mysql.dll // extension php_mysql.dll. You can use the MySQL statement.
Extension = php_gd2.dll // allow creation and modify the image
Extension = php_ming.dll // SWF support
Extension = php_dbase.dll // maplab requires php_dbase support
These vary from person to person when to add, sometimes to download DLL files
3. Enable Apache to run phpProgram
Modify the C:/apaceh2.2/CONF/httpd. conf file
3.1. Add in the loading module area:
# Add the next line of loadmodule ssl_module modules/mod_ssl.so
Loadmodule php5_module D:/php5.2/php5apache2_2.dll
3.2. Add in the add type area:
In addtype application/X-gzip. GZ. tgz, add
Addtype application/X-httpd-PHP. php
3.3. scr restart ptalias/PHP/"C:/PHP/" // specify the directory of the PHP script. This is not changed.
3. 4. When modifying DocumentRoot, you must modify the two directories.
DocumentRoot "C :/......"
And The paths in the two locations must be consistent. Otherwise, an access denial error will be sent.
3.5. Locate directoryindex:
Directoryindex index. php index. php. var index.htm. var index. xml index. xml. var
There are more Tag.
3.6.adddefacharcharset cannot be found! Apache has used the standard encoding method to estimate character problems.
Save.