seaprince.cn
Preparation before starting
Before you start, you need to prepare the following things:
- Microsoft Visual C++, it is recommended to use Visual C++ 2008, Express Edition or Professional Edition.
- Windows SDK, download address: aspx?FamilyId=F26B1AA4-741A-433A-9BE5-FA919850BDBF&displaylang=en">http://www.microsoft.com/downloads/details.aspx?FamilyId= F26B1AA4-741A-433A-9BE5-FA919850BDBF&displaylang=en It is not recommended to use that network to install, it is too slow, and I don’t know when it will be completed. Also, it is recommended to install them all.
- Other tools, download address: http://pecl2.php.net/downloads/php-windows-builds/php-libs/binary-tools.zip
Compilation steps
- Download and install VC++ 2008, and install it.
- Install windows sdk 6.1
- Download php5.3, download address: http://cn.php.net/get/php-5.3.0.tar.bz2/from/this/mirror
- Create a folder, such as C:php-sdk
- Extract the package downloaded in the third step above here. After decompression, there should be two subdirectories in C:php-sdk: bin, script
- Open Microsoft Windows SDK v6.1/CMD Shell in the start menu and enter the command:
setenv /x86 /xp /release
cd c:php-sdk
binphpsdk_setvars.bat
binphpsdk_buildtree.bat php53dev
- The previous step will create some directories. Enter vc9x86 and decompress php5.3.0 here. The directory structure after decompression is: vc9x86php5.3.0
- Enter at the command line of WIN-SDK:
cd C:php-sdkphp53devvc9x86php5.3.0
buildconf
- At this step, it is almost the same as under Linux. You can take a look at the compile option help:
configure –help
- Okay, let’s do a minimal compilation:
configure –disable-all –enable-cli
nmake
- This step is no problem on PHP wiki, but since we are in a Chinese environment, the following error will be reported:
- Open the extstandard rowscap.c file with Editplus,
select Yes, and select Western European (Windows)
and save it as UTF-8 encoding.
- Recompile nmake, and then use nmake snap to compile into the final binary package. The binary package is under php-5.3.0Release_TS. A possible name is php-5.3.0-Win32-VC9-x86.zip
- Test it:
The next article will be about how to compile the pecl extension.
http://www.bkjia.com/PHPjc/508461.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/508461.htmlTechArticleseaprince.cn Before you start, you need to prepare the following things: Microsoft Visual C++, Visual C++ 2008 is recommended, Both Express and Professional versions are available. Windows SDK, download address:...
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn