Software Version
Apache 2.2.3
Php5.2.17 zip
Note: During the download process, for Apache to download the thread-safe version (vc6 thread-safe)
Installation Procedure [modify the following path based on the actual installation conditions]
1. install Apache and click Next. To the end.
2. Decompress PHP to drive, for example, D: \ PhP5.
3. Modify the PHP configuration: php. ini
Find PHP. ini-Dist in the D: \ PhP5 directory and change the name to PhP. ini.
Rename PHP. ini-Dist to PhP. ini.
Find
extension_dir = "./"
Change
extension_dir = "D:/PHP5/ext"
Find
;extension=php_mbstring.dll
;extension=php_mysql.dll
;extension=php_gd2.dll
Change
extension=php_mbstring.dll
extension=php_mysql.dll
extension=php_gd2.dll
Find
;date.timezone =
Change
date.timezone = Asia/Shanghai
(Time Zone see http://us3.php.net/manual/en/timezones.asia.php)
Create a session folder in the PHP Directory
Find
;session.save_path = "/tmp"
Change
session.save_path = "D:/PHP5/session"
=================================================================
Modify Apache configuration: httpd. conf
Create a folder named wwwroot on disk D (default website directory)
Find
DocumentRoot "D:/Apache/htdocs"
Change
DocumentRoot "D:/wwwroot"
Find
<Directory "D:/Apache/htdocs">
Change
<Directory "D:/wwwroot">
Find
DirectoryIndex index.html
Change
DirectoryIndex index.html index.htm index.php
Find
#LoadModule ssl_module modules/mod_ssl.so
Add
LoadModule php5_module "D:/PHP5/php5apache2_2_filter.dll"
Add the following statement at the end of the httpd. conf file
# PHP5
PHPIniDir "D:/PHP5"
ScriptAlias /php/ "D:/PHP5/"
Action application/x-httpd-php "/php/php-cgi.exe"
AddType application/x-httpd-php .php
====================================
Write a test file index. php
<? PHP phpinfo ();?>