1.将下载的php的zip包解压缩到c:/php
2.默认安装apache2.2.4后,安装目录为:C:/Program Files/Apache Software Foundation/Apache2.2
3.按照php.net网站的设置方法( http://www.php.net/manual/en/install.windows.apache2.php)将php做为模块对apache进行配置:
# For PHP
4
do
something like
this
:
LoadModule php4_module
"
c:/php/php4apache2.dll
"
# Don
'
t forget to copy the php4apache2.dll file from the sapi directory!
AddType application
/
x
-
httpd
-
php .php

# For PHP
5
do
something like
this
:
LoadModule php5_module
"
c:/php/php5apache2.dll
"
AddType application
/
x
-
httpd
-
php .php

# configure the path to php.ini
PHPIniDir
"
C:/php
"
# For PHP
4
do
something like
this
:
LoadModule php4_module
"
c:/php/php4apache2.dll
"
# Don
'
t forget to copy the php4apache2.dll file from the sapi directory!
AddType application
/
x
-
httpd
-
php .php

# For PHP
5
do
something like
this
:
LoadModule php5_module
"
c:/php/php5apache2_2.dll
"
AddType application
/
x
-
httpd
-
php .php

# configure the path to php.ini
PHPIniDir
"
C:/php
"
2.默认安装apache2.2.4后,安装目录为:C:/Program Files/Apache Software Foundation/Apache2.2
3.按照php.net网站的设置方法( http://www.php.net/manual/en/install.windows.apache2.php)将php做为模块对apache进行配置:











这样配置后apache启动失败,后来查询相关资料后,将配置改为:












apache启动成功,测试php页也成功。