Home > php教程 > php手册 > 在windows平台上构建自己的PHP(仅适用于php5.2)

在windows平台上构建自己的PHP(仅适用于php5.2)

WBOY
Release: 2016-06-13 11:28:41
Original
1132 people have browsed it

构建步骤

1, 安装vs2008

2, 安装windows sdk 6.1

3, 下载php 5.2源码,可以从此处获取Releases (先不要解压)

4, 下载bindlib_w32.zip,http://www.php.net/extra/bindlib_w32.zip

5, 下载win32build.zip,http://www.php.net/extra/win32build.zip

6, 下载libxml2,iconv,zlib等库 http://www.zlatkovic.com/pub/libxml/

7, 创建C:\php5.2-mybuild (也可以改成你想要的目录,比如C:\test等等)。 接着创建C:\php5.2-mybuild\win32build, C:\php5.2-mybuild\bindlib_w32, C:\php5.2-mybuild\php-src 。

8, 解压 win32build.zip 到 C:\php5.2-mybuild\win32build 。 解压后C:\php5.2-mybuild\win32build应该包含bin,include,lib等子目录。

9, 解压 bindlib_w32.zip 到 C:\php5.2-mybuild\bindlib_w32 。

      编译bindlib_w32,生成的resolv.lib 放到 C:\php5.2-mybuild\win32build\lib 中,覆盖掉原来的。

10,解压 php 5.2源码 到 C:\php5.2-mybuild\php-src

11,打开windows sdk 6.1 shell,键入下述指令:

setenv /x86 /xp /release

12,

cd C:\php5.2-mybuild\php-src

13,

buildconf

14,查看编译选项

cscript /nologo configure.js --help

15,根据自己的需要输入构建指令:

cscript /nologo configure.js --enable-object-out-dir="C:\php5.2-mybuild" --with-php-build="C:\php5.2-mybuild\win32build" --disable-all  --enable-cli

16,

nmake

17,make完之后,可以看到C:\php5.2-mybuild目录下新增了Release_TS文件夹,该文件夹用于存放build之后的文件,可以通过修改--enable-object-out-dir来配置自己指定的输出目录。

 

source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template