Before you begin, you need to prepare the following: MicrosoftVisualC ++. we recommend that you use Visual C ++ 2008, quick or Professional Edition. WindowsSDK,: http://www.microsoft.com/downloads/details.aspx? FamilyIdF26B1AA4-7 seaprince.cn preparation before start
Before you start, you need to prepare the following:
- Microsoft Visual C ++, Visual C ++ 2008, quick or Professional Edition is recommended.
- Windows SDK,: aspx? FamilyId = F26B1AA4-741A-433A-9BE5-FA919850BDBF & displaylang = en ">Http://www.microsoft.com/downloads/details.aspx? FamilyId = F26B1AA4-741A-433A-9BE5-FA919850BDBF & displaylang = enIt is not recommended to use that network for installation. it is too slow to complete. We also recommend that you install all of them.
- Other tools ,:Http://pecl2.php.net/downloads/php-windows-builds/php-libs/binary-tools.zip
Compilation steps
- Download and install VC ++ 2008.
- Install windows sdk 6.1
- Download php5.3 ,:Http://cn.php.net/get/php-5.3.0.tar.bz2/from/this/mirror
- Create a folder, such as C: php-sdk
- Decompress the package downloaded in step 3 here. after the package is decompressed, the C: php-sdk should contain two subdirectories: bin and script.
- Open Microsoft Windows SDK v6.1/CMD Shell in the Start menu and enter the following command:
Setenv/x86/xp/release
Cd c: php-sdk
Binphpsdk_setvars.bat
Binphpsdk_buildtree.bat php53dev
- Some directories will be created in the previous step. Go to vc9x86, decompress php5.3.0 here, and unzip the directory structure: vc9x86php5.3.0
- Enter:
Cd C: php-sdkphp53devvc9x86php5.3.0
Buildconf
- In this step, it is almost the same as in linux. you can check the compilation options for help:
Configure? Help
- Well, let's make a minimal compilation:
Configure? Disable-all? Enable-cli
Nmake
- This step is correct on php wiki, but the following error is reported because we are in a Chinese environment:
- Use Editplus to open the extstandardrowscap. c file,
Select yes and select Western European (Windows)
Then save it as UTF-8 encoding.
- RepeatNmakeCompile and then useNmake snapCompiled into the final binary package. The binary package is in the php-5.3.0Release_TS. The name is php-5.3.0-win32-vc9-x86.zip.
- Test:
Next article describes how to compile the pecl extension.