标题: PHP网页编程之在 Windows 上面从源代码编译 PHP 的步... [打印本页] 作者: 山那边是海 时间: 2015-2-16 00:28 标题: PHP网页编程之在 Windows 上面从源代码编译 PHP 的步... 我假设你目前已经可以完成一个静态页面了,当然,做的好看难看是另外一说,皮皮我的第一个网页也没好看到哪去,但是“孩子”再丑,咱们做“爹妈”的也不能嫌弃不是?这毕竟是咱的成果。window|编译|源代码 Building from source
从源代码创立
Before getting started, it is worthwhile answering the question: "Why is building on Windows so hard?" Two reasons come to
mind:
在入手下手前,咱们往返答一个成绩:“为何在 Windows 下编译 php 如斯坚苦?“,2个注重的缘由是:
Windows does not (yet) enjoy a large community of developers who are willing to freely share their source. As a direct
result, the necessary investment in infrastructure required to support such development hasnt been made. By and large, what
is available has been made possible by the porting of necessary utilities from Unix. Dont be surprised if some of this
heritage shows through from time to time.
Windows 不是一个大批情愿收费同享他们代码的开辟整体。直接招致撑持这些开辟的基本投资没有创立,而Unix 能够已创立了。
Pretty much all of the instructions that follow are of the "set and forget" variety. So sit back and try follow the
instructions below as faithfully as you can.
上面的大多半好器材是"set and forget".所以请尽量严厉依照上面的步调停止。
Preparations
Before you get started, you have a lot to download....
筹办:
在入手下手前,你需求下载很多器材!!
For starters, get the Cygwin toolkit from the closest Cygnus mirror site. What you are looking for is cygwin.exe file. This
will provide you most of the popular GNU utilities used by the build process.
http://sources.redhat.com/cygwin/download.html
入手下手,从比来的 Cygnus 的镜像站点获得 Cygwin 东西箱。你要找的是 cygwin.exe 文件。他供应了大多半盛行的 GNU 东西用于编译进程:
Download the rest of the build tools you will need from the PHP site at http://www.php.net/extra/win32build.zip.
下载其他的编译需求的东西,从 php 的站点:
Get the source code for the DNS name resolver used by PHP at http://www.php.net/extra/bindlib_w32.zip. This is a replacement
for the resolv.lib library included in win32build.zip.
取得 PHP 利用的用于 DNS 名字解析的源代码。交换 win32build.zip 外面的 resolv.lib 文件
If you dont already have an unzip utility, you will need one. A free version is available from InfoZip.
假如你没有解紧缩东西,你需求下载一个。 InfoZip 有一个收费的!!
Finally, you are going to need the source to PHP 4 itself. You can get the latest development version using anonymous CVS. If
you get a snapshot or a source tarball, you not only will have to untar and ungzip it, but you will have to convert the bare
linefeeds to crlfs in the *.dsp and *.dsw files before Microsoft Visual C++ will have anything to do with them.
At this point, you should have a usable php.exe in either your Debug_TS or Release_TS subdirectories.
这时候,你可以失掉可用的 php.exe 在你的 Debug_TS 或 Release_TS 子目次上面。
Repeat the above steps with php4isapi.dsp (which can be found in sapiisapi) in order to build the code necessary for