Home > Article > Backend Development > Build your own PHP on Windows platform (only for php5.2)_PHP tutorial
1, install vs2008
2, install windows sdk 6.1
3. Download the php 5.2 source code, you can get Releases from here (don’t unzip it yet)
4. Download bindlib_w32.zip, http://www.php.net/extra/bindlib_w32.zip
5. Download win32build.zip, http://www.php.net/extra/win32build.zip
6. Download libxml2, iconv, zlib and other libraries http://www.zlatkovic.com/pub/libxml/
7. Create C:php5.2-mybuild (you can also change it to the directory you want, such as C:test, etc.). Then create C:php5.2-mybuildwin32build, C:php5.2-mybuildbindlib_w32, C:php5.2-mybuildphp-src.
8. Unzip win32build.zip to C:php5.2-mybuildwin32build. After decompression, C:php5.2-mybuildwin32build should contain bin, include, lib and other subdirectories.
9. Unzip bindlib_w32.zip to C:php5.2-mybuildbindlib_w32.
Compile bindlib_w32, and put the generated resolv.lib into C:php5.2-mybuildwin32buildlib, overwriting the original one.
10. Unzip the php 5.2 source code to C:php5.2-mybuildphp-src
11. Open windows sdk 6.1 shell and type the following command:
setenv /x86 /xp /release
12,
cd C:php5.2-mybuildphp-src
13,
buildconf
14, view compilation options
cscript /nologo configure.js --help
15, enter the build instructions according to your needs:
cscript /nologo configure.js --enable-object-out-dir="C:php5.2-mybuild" --with-php-build="C:php5.2-mybuildwin32build" --disable-all --enable-cli
16,
nmake
17. After make is completed, you can see that the Release_TS folder has been added to the C:php5.2-mybuild directory. This folder is used to store the files after the build. You can modify it by --enable-object-out- dir to configure the output directory you specify.