2

我正在运行:Apache 2 PHP 5.3.3 CentOS

当我检查 pcre 时,我看到:

pcretest -C

PCRE version 6.6 06-Feb-2006
Compiled with
  UTF-8 support
  Unicode properties support
  Newline character is LF
  Internal link size = 2
  POSIX malloc threshold = 10
  Default match limit = 10000000
  Default recursion depth limit = 10000000
  Match recursion uses stack

但是,当尝试运行 shell 时,我得到以下信息:

Warning: preg_replace_callback(): Compilation failed: unrecognized character after (?< at offset 4 in /var/CakePHP/cakephp_2.0.5/lib/Cake/Console/ConsoleOutput.php on line 186

我已经阅读了所有关于 PHP 版本的票,确保 pcre 是最新的,并确保 pcre 在 cakephp 错误列表中具有 unicode 支持。任何想法如何解决这个问题,以便我可以在 CakePHP 2.0.5 中运行控制台命令?

更新:

抱歉,这是第 185 行的代码:

return preg_replace_callback(
   '/<(?<tag>[a-z0-9-_]+)>(?<text>.*?)<\/(\1)>/ims', array($this, '_replaceTags'), $text
);

另请注意,这目前适用于其他地方(即在我的 MacBook Pro 上运行)

4

2 回答 2

3

对此有一个简单的单行修复。在以下位置查看差异:

https://github.com/cakephp/cakephp/pull/681/files

于 2012-06-01T18:17:29.283 回答
0

看起来需要升级到 pcre。

于 2012-01-27T21:23:36.807 回答