みんな! mod_phpとPCREとApacheの統合に関する助けを求めるFreeBSD noobie。PCREはUTFサポートなしでコンパイルされます
私が持っているもの:
- はFreeBSD 8.2-RELEASE-P3
- のApache/2.2.22(FreeBSDの、ポートから構築された)Suhosinパッチ(CLI)で
- PHP 5.3.10を(構築された: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 < somecode.php
で、コマンドラインからの私のPHPアプリケーションを実行しようとするすべてのものは、正常に動作します。
しかし、私は、Apacheを経由して、それを実行したとき、私はこのエラーが表示されます。Compilation failed: this version of PCRE is compiled without UTF support at offset 0
私は--with-pcre=/usr/local/bin
でのポートからのapacheを再構築しようとしましたが、そのApacheがPCRE-configスクリプトを見つけることができませんでしたメッセージで失敗しましました。
何が間違っている可能性がありますか?
は非常によく似た質問に対する[この回答](http://stackoverflow.com/a/2107027/198536)を見てください。 – wallyk
@wallyk、ありがとう!しかし、それは私の変種ではありません。私はすでにutfとUnicodeのサポートでPCREを再コンパイルしました。そしてcli-modeでphpでうまく動作します。私の問題はapache pcre-moduleにあります。 – RomiC
ApacheのPHPがコマンドラインのPHPと同じであることを確認しましたか?たぶん、2番目のバージョンがあります。また、pcreの2つのバージョンがインストールされているかどうかを確認してください。 – arved