1. install Apache
To the official site where Apache is released. htp: // example. If there is nothing wrong with the installation, Apache will be ready to use after the installation is complete. There are many readme files under the Apache installation directory for reference, but only one file is about the Win32 platform, including Window 9x and Windows NT.
Ii. install PHP
Go to the official PHP release site, select an image, find the Download Area, select "Source code and Windows distribution", and download "Windows Binary ". You only need to extract the downloaded file to your favorite directory, such as C: PHP4B3. we recommend that you use the version number as the directory name, so that you do not need to delete the old version when you try to update the version in the future. Install PHP4 Beta in Windows 95/97 With DCOM support. If your machine is not installed, download one here.
3. Configure PHP
The file package distributed with PHP contains the main configuration file PHP. INI-dist. Copy it to your Windows System directory (Windows 9x Windows or Windows NT WinNT directory) and change it to PHP. INI. You need to make proper modifications to this file. The most important thing is to add modules that may be used, such as adding MySQL support. Find the "Dynamic Extensions" column in the PHP. ini file:
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions;
;;;;;;;;;;;;;;;;;;;;;;
Modify; extension = php_mysql.dll
Remove ";" from the front
Under certain circumstances, if the DLL file you want to use is not in this list, simply add a line, such as "extension = mydll. dll ". In this way, PHP is configured.
4. Let Apache and PHP work together
Find the directory where you installed Apache in Section 1 and open it in your favorite file editor. confhttpd. conf file. In this example, It is c: Apacheconfhttpd. conf (this is the most important configuration file of APACHE ). To make Apache and PHP work together, you only need to add a few lines, as shown below:
ScriptAlias/php4b3/"C:/PHP4B3 /"
AddType application/x-httpd-php3. php3
AddType application/x-httpd-php3. php
AddType applications/x-httpd-php3. phtml
Action application/x-httpd-php3 "/php4b3/php.exe"