1. download related apache and php
1.1 make sure the version is same with your host(x86 or x64)
1.2 download related vc version
PHP are built with VC9, VC11 or VC14 (Visual Studio 2008, 2012 or 2015
compiler respectively) and include improvements in performance and stability.
- The VC9 builds require you to have the Visual C++ Redistributable for
Visual Studio 2008 SP1 x86 or x64 installed
- The VC11 builds require to have the Visual C++ Redistributable for Visual
Studio 2012 x86 or x64 installed
- The VC14 builds require to have the Visual C++ Redistributable for Visual
Studio 2015 x86 or x64 installed
http://windows.php.net/download/
http://www.apachelounge.com/download/VC11/
2. php for windows need thread safe version
3. unzip apache and php to c:\
4. config php.ini
5. config httpd.conf
LoadModule php5_module “c:/php/php5apache2_4.dll”
AddType application/x-httpd-php .php
let apache find php, add below line to the end of httpd.conf:
PHPIniDir “c:/php”
config index file:
DirectoryIndex index.php index.html
6. write one test.php file, put it under Apache htdocs dir, restart Apache,
using browser test it.
file content:
<?php phpinfo(); ?>
url:
localhost/test.php