From: http://www.phpweblog.net/tanqimin/archive/2007/07/01/1424.aspx
The method for configuring the PHP environment on the internet is ineffective. I decided to write one by myself and forget it!
(1) download Apache 2.x, PHP 5.x, and MySQL 5.x first.
(2) install Apache (Note: If your system is installed with IIS or other Web servers, stop working first). After the installation is complete, access http: // localhost and a message indicating that the server is working
(3) install mysql. Remember the password.
(4) refer to the official PHP website:
A. decompress the compressed package to the D:/PHP/folder (you can select another disk)
B. Copy PHP. ini-recommended from D:/PHP/to the Windows folder and rename it PHP. ini.
C. Open PHP. ini and change php_gd2.dll, php_mysql.dll, php_mysqli.dll, and php_xsl.dll to extension (simply remove the semicolons in front of them)
D. It is recommended to send an error report in the development environment (this step is optional), locate error_reporting in PHP. ini, and change it to error_reporting = e_all.
E. Copy php5ts. dll and libmysql. dll under D:/PHP/to the System32 folder of windows.
F. Copy php_gd2.dll, php_mysql.dll, php_mysqli.dll, and php_xsl.dll under D:/PHP/EXT/to the System32 folder of windows.
G. Open the Apache configuration file httpd. conf, find many loadmodule entries, and add the following content:
Loadmodule php5_module D:/PHP/php5apache2_2.dll
Locate <ifmodule mime_module> and add the following content in the corresponding location:
Addtype application/X-httpd-PHP. php
H. Find the directoryindex entry and change it to the following:
Directoryindex index.html. var index. php
I. Save the file and restart the Apache server.
J. in the C:/program files/Apache Software Foundation/apache2.2/htdocs directory (this is the default path of the website. You can modify the configuration by searching this part and changing it to the actual path, note:/must be replaced with/) to delete the original file and create a new file named index. the content of the PHP file is as follows: <? PHP
Phpinfo ();
?>
K. Finally, enter the URL http: // localhost/index. php In the browser, and you will see the page for PHP information.
(5) Congratulations, configuration successful!