preg_replace_callback()警告运行CakePHP的外壳时
问题描述:
我运行: 的Apache 2 PHP 5.3.3 CentOS的preg_replace_callback()警告运行CakePHP的外壳时
当我检查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中运行控制台命令?
UPDATE:
对不起,这里是上线码185:
return preg_replace_callback(
'/<(?<tag>[a-z0-9-_]+)>(?<text>.*?)<\/(\1)>/ims', array($this, '_replaceTags'), $text
);
另外请注意,这个当前工作的其他地方(即在我的MacBook Pro上运行)
答
它看起来就像升级到pcre是必需的。
我们可以看到,打碎了实际的正则表达式?现在,这是无法回答的... – Charles 2012-01-27 19:07:33