freebsd 6.x-amd64下pecl-xdiff导致php crash

xdiff有什么用? 简单来说就是比较2个字符串的差异,例如这个页面

http://www.mipang.com/places/2037/bible/7962/history

这是使用xdiff来比较各个历史版本之间差异的例子.

之前我也安装过多次pecl-xdiff, 经常碰到编译成功,php载入该模块也没问题,但是当使用它提供的xdiff_xxx函数时就导致php崩溃. 尝试过不同的php版本和pecl-xdiff版本的组合,偶尔能正常运行,当时也没彻底解决这个问题.

最近要在一个特定php版本上安装这个pecl-xdiff 又碰到了这个情况.

解决办法:

在 config.h 文件中

/* #undef HAVE_XDL_ALLOCATOR_PRIV */
改成
#define HAVE_XDL_ALLOCATOR_PRIV 1

重新编译安装即可.

* 不确定其他平台有没有类似问题,写出来至少可以给大家一个解决的参考.

4 条评论 »

  1. 偶爱偶家 said,

    2007/9/25 @ 23:38

    兄弟, 中秋快乐!

  2. wjf said,

    2008/7/1 @ 15:05

    linux下没有问题

  3. Nukq said,

    2008/7/1 @ 15:11

    偶尔有几个版本会碰到

    在FreeBSD7.0 和 php5.2.6上也没碰到问题。

  4. wjf said,

    2008/7/2 @ 10:11

    Nukq你好,你有在线联系方式嘛

RSS feed for comments on this post · TrackBack URI

发表看法

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word