PCRE是不支持UTF编译 [英] PCRE is compiled without UTF support
问题描述
大家好! FreeBSD的noobie寻求一些帮助,集成PCRE和Apache与mod_php,并且。
everyone! FreeBSD noobie looking for some help with integration of PCRE and Apache with mod_php.
我有什么:
- 的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
- FreeBSD 8.2-RELEASE-p3
- Apache/2.2.22 (FreeBSD, built from ports)
- PHP 5.3.10 with Suhosin-Patch (cli) (built: Apr 6 2012 02:58:27) (not from ports)
PCRE version 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版本:
php -i | grep -i pcre
tells me, he uses version of PCRE below:
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<一些code.php
。
And everything works fine, when I try to run my php application from command line, in such way php < somecode.php
.
但是,当我通过Apache执行它,我收到此错误:编译失败:这个版本的PCRE编译没有UTF支持在偏移0
But when I execute it via apache, I receive this error: Compilation failed: this version of PCRE is compiled without UTF support at offset 0
我试图重建从港口的Apache - 与-PCRE =的/ usr / local / bin目录
,但其失败消息阿帕奇找不到PCRE-config脚本。
I've tried to rebuild apache from ports with --with-pcre=/usr/local/bin
, but its failed with message that apache couldn't find pcre-config script.
的可能是错了呢?
推荐答案
解决问题,只是与重建PCRE系统,而不是默认的Apache。与做同样的,你建阿帕奇 - 与-PCRE
选项,其中应包含完整路径 PCRE-配置
包括PCRE-配置本身。在我的情况下,它是 - 与-PCRE =的/ usr / local / bin目录/ PCRE-配置
Resolved problem just rebuilt apache with system pcre instead of default. To do the same, built your apache with --with-pcre
option, which should contain the full path to pcre-config
including pcre-config itself. In my case it's --with-pcre=/usr/local/bin/pcre-config
.
感谢所有)
这篇关于PCRE是不支持UTF编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!