How to compile PHP on Windows

  Step-by-step process to SUCCESSFULLY compile PHP

Compile PHP

SYSTEM

Windows Server 2003 R2
PHP 5.3
Apache 2.2
php_excel 1.0.0
LibXL 3.5.4.1
Visual Studio 2008 (VC9)

INSTALLATION

Install Microsoft Windows Server 2003 x86 incl. Service Packs
Install Microsoft .NET Framework 2.0
Install Microsoft Windows SDK v6.1 (6.0.6001.18000.367-KRMSDK_EN.iso)
Install en_visual_studio_2008_professional_x86_dvd_X14-26326.iso
Install en_visual_studio_2008_service_pack_1_x86_dvd_x15-12962.iso
Install Microsoft Visual C++ 2008 SP1
Extract php-sdk-binary-tools-20110915.zip to C:\php-sdk
Extract deps-5.3-vc9-x86.7z to C:\php-sdk\phpdev\vc9\x86\deps
Extract php-5.3.28-src.zip to C:\php-sdk\phpdev\vc9\x86\php-5.3.28

Open Microsoft Windows SDK v6.1 > CMD Shell

COMMANDS (to compile PHP)

setenv /x86 /xp /release
cd /d c:\php-sdk\
bin\phpsdk_setvars.bat
bin\phpsdk_buildtree.bat phpdev
cd /d C:\php-sdk\phpdev\vc9\x86\php-5.3.28
buildconf
configure --help
configure --enable-apache2-2handler --with-curl --enable-fileinfo --enable-mbstring --enable-mbregex --with-mcrypt --with-openssl --with-pgsql --enable-sockets --with-mysql --with-mysqli --enable-pdo --with-pdo-mysql --with-pdo-mssql --with-pdo-pgsql --enable-soap --with-xmlrpc --with-xsl
nmake
nmake clean all

LibXL (additional steps)

Extract php_excel-1.0.0.zip to C:\php-sdk\phpdev\vc9\x86\php-5.3.28\ext\excel
Extract \libxl-3.5.4.1\include_c\* to C:\php-sdk\phpdev\vc9\x86\deps\include\libxl
Extract \libxl-3.5.4.1\lib\libxl.lib to C:\php-sdk\phpdev\vc9\x86\deps\lib\libxl.lib
buildconf
configure --with-excel=shared
nmake