1. 对于Windows + Apache服务器来说,下载VC6 + Thread Safe版本。
2. 安装好PHP后,需要确认PHP的路径在PATH中设定完毕;然后修改Apache的httpd.conf文件,加入如下二行:
#
LoadModule php5_module "C:/Program Files/PHP/php5apache2_2.dll"
AddHandler application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "C:/Program Files/PHP"
需要注意装载的dll版本。
3. 如果安装后在命令行运行出错,那么
do:
php -n -v
if it works, that means you are loading extensions with missing dependencies.
Open your php.ini and verify which extension it loads.
4. 启动Apache服务器,测试页面,
<?php
phpinfo();
?>