标签:
安装步骤:
1.下载安装pcre,8.21版本开始pcre支持jit
2.编译php源码
需要修改php源码中ext/pcre/pcre.c文件中代码:
1 //将此行: 2 3 if (pcre_info(pce->re, NULL, NULL) == PCRE_ERROR_BADMAGIC) { 4 5 //改为: 6 int count = 0; if (pcre_fullinfo(pce->re, NULL, PCRE_INFO_CAPTURECOUNT, &count) == PCRE_ERROR_BADMAGIC) { 7 8 zend_hash_clean(&PCRE_G(pcre_cache)); 9 } else {
pcre8.30以上版本将pcre_info函数移除,用pcre_fullinfo代替。
configure添加--with-pcre-regex=DIR选项
make && make install
【参考资料】
https://code.google.com/p/php52-backports/issues/detail?id=33
http://www.pcre.org/changelog.txt
标签:
原文地址:http://www.cnblogs.com/zhaowt/p/4721862.html