PCRE是在没有UTF支持的情况下编译的

时间:2022-09-17 08:18:27

everyone! FreeBSD noobie looking for some help with integration of PCRE and Apache with mod_php.

每个人!FreeBSD noobie寻求一些帮助,以集成PCRE和Apache和mod_php。

What I have:

我有什么:

  • FreeBSD 8.2-RELEASE-p3
  • FreeBSD 8.2 -release-p3
  • Apache/2.2.22 (FreeBSD, built from ports)
  • Apache/2.2.22 (FreeBSD,从端口构建)
  • PHP 5.3.10 with Suhosin-Patch (cli) (built: Apr 6 2012 02:58:27) (not from ports)
  • PHP 5.3.10与Suhosin-Patch (cli)(构建:2012年4月6日02:58:27)(不从端口)
  • PCRE version 8.30 2012-02-04

    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 tells me, he uses version of PCRE below:

php - | 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

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

当我尝试从命令行运行php应用程序时,一切都运行得很好,比如php < somecode.php。

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编译时没有UTF支持,偏移量为0

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=/usr/local/bin从端口重新构建apache,但是它失败了,因为apache无法找到pcl -config脚本。

What's could be wrong?

可能是错的是什么?

1 个解决方案

#1


4  

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而不是默认的方式重新构建apache。为此,使用-with-pcre选项构建您的apache,该选项应该包含ppi -config的完整路径,包括ppi -config本身。在我的例子中,它是—with-pcre=/usr/local/bin/ pcreconfig。

Thanks to all)

感谢所有)

#1


4  

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而不是默认的方式重新构建apache。为此,使用-with-pcre选项构建您的apache,该选项应该包含ppi -config的完整路径,包括ppi -config本身。在我的例子中,它是—with-pcre=/usr/local/bin/ pcreconfig。

Thanks to all)

感谢所有)