大家好! FreeBSD noobie寻找一些帮助,用mod_php集成PCRE和Apache。PCRE编译时没有UTF支持
我有什么:
- 的FreeBSD 8.2-RELEASE-P3
- 的Apache/2.2.22(FreeBSD的,从港口建)
- PHP 5.3.10用了Suhosin贴片(CLI)(建:2012年4月6日2时58分27秒)(而不是从端口)
PCRE版本8.30 2012-02-04
Compiled with 8-bit support only UTF-8 support Unicode properties support No just-in-time compiler support Newline sequence is LF \R matches all Unicode newlines Internal link size = 2 POSIX malloc threshold = 10 Default match limit = 10000000 Default recursion depth limit = 10000000 Match recursion uses stack
php -i | grep -i pcre
告诉我,他用下面PCRE的版本:
Configure Command => './configure' '--with-layout=GNU'
'--localstatedir=/var' '--with-config-file-scan-dir=/usr/local/etc/php'
'--disable-all' '--enable-libxml' '--enable-mysqlnd'
'--with-libxml-dir=/usr/local' '--with-pcre-regex=/usr/local/lib'
'--with-zlib-dir=/usr' '--program-prefix=' '--with-apxs2=/usr/local/sbin/apxs'
'--with-regex=php' '--with-zend-vm=CALL'
'--enable-zend-multibyte' '--prefix=/usr/local'
'--mandir=/usr/local/man' '--infodir=/usr/local/info/'
'--build=i386-portbld-freebsd8.2'
pcre
PCRE (Perl Compatible Regular Expressions) Support => enabled
PCRE Library Version => 8.30 2012-02-04
pcre.backtrack_limit => 1000000 => 1000000
pcre.recursion_limit => 100000 => 100000
,一切工作正常,当我尝试运行命令行我的PHP应用程序,以这样的方式php < somecode.php
。
但是当我通过Apache执行它,我收到此错误:Compilation failed: this version of PCRE is compiled without UTF support at offset 0
我试图从港口重建阿帕奇与--with-pcre=/usr/local/bin
,但它与消息阿帕奇找不到PCRE-config脚本失败。
什么可能是错误的?
看一看[这个答案](http://stackoverflow.com/a/2107027/198536)一个非常类似的问题。 – wallyk 2012-04-06 07:00:16
@wallyk,谢谢!但这不是我的变体。我已经使用utf和unicode支持重新编译PCRE,并且它可以在cli模式下正常工作。我的问题是在Apache的pcre模块,如果我理解正确。 – RomiC 2012-04-06 08:43:31
您是否检查过apache上的php与命令行中的php相同?也许你有第二个版本。另外检查一下,也许有两个版本的pcre安装。 – arved 2012-04-06 09:06:06