PCRE 是在不支持 UTF 的情况下编译的 [英] PCRE is compiled without UTF support

查看:32
本文介绍了PCRE 是在不支持 UTF 的情况下编译的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家!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,从端口构建)
  • 带有 Suhosin-Patch (cli) 的 PHP 5.3.10(构建时间:2012 年 4 月 6 日 02: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 <somecode.php.

And everything works fine, when I try to run my php application from command line, in such way php < somecode.php.

但是当我通过 apache 执行它时,我收到这个错误:编译失败:这个版本的 PCRE 在偏移 0 处编译时没有 UTF 支持

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

我尝试使用 --with-pcre=/usr/local/bin 从端口重建 apache,但失败并显示 apache 找不到 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.要做到这一点,请使用 --with-pcre 选项构建您的 apache,该选项应包含 pcre-config 的完整路径,包括 pcre-config 本身.就我而言,它是 --with-pcre=/usr/local/bin/pcre-config.

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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆