简体   繁体   English

PHP Kohana CentOS 5

[英]PHP Kohana CentOS 5

Trying to deploy a Kohana based project in CentOS 5. Installed PHP 5.3.1 but still getting the following error. 尝试在CentOS 5中部署基于Kohana的项目。安装了PHP 5.3.1,但仍然收到以下错误。

Warning: preg_match() [function.preg-match]: Compilation failed: this version of PCRE is not compiled with PCRE_UTF8 support at offset 0 in /usr/local/apache2/htdocs/icarus/system/core/utf8.php on line 30

Fatal error: PCRE has not been compiled with UTF-8 support. See PCRE Pattern Modifiers for more information. This application cannot be run without UTF-8 support. in /usr/local/apache2/htdocs/icarus/system/core/utf8.php on line 38

Trying since last 2 days, i upgraded my PHP from 5.1 to 5.3 but still getting the same error.The problem as per me is that the PCRE module of PHP in phpinfo() says is of sep 2004. Below is the actual line 从最近两天开始尝试,我将PHP从5.1升级到5.3,但仍然收到相同的错误。我的问题是phpinfo()中PHP的PCRE模块说的是2004年9月。下面是实际代码

PCRE Library Version    5.0 13-Sep-2004 

Can anyone tell me how to upgrade it or wats the solution to the problem. 谁能告诉我如何升级它或等待问题解决方案。

Thanks. 谢谢。

I can't really help you, but it seems like PHP (or Apache?) is using its own PCRE library, and not necessarily the one installed on the system. 我无法真正为您提供帮助,但似乎PHP(或Apache?)正在使用其自己的PCRE库,而不一定安装在系统上。

Maybe the very last post in this forum entry gives you at least a starting point. 也许此论坛条目中的最后一篇文章至少为您提供了一个起点。

I'm not a drupie, but this list had the most informative information I found about the PCRE and UTF8 error. 我不是德鲁皮,但是此列表提供了有关PCRE和UTF8错误的最丰富的信息。

My pcretesting -C output said I had 6.6 installed with UTF-8 support, but the phpinfo() output confirmed what others said above about apache having it's own PCRE build.. mine was 5.3 something.. and that it did not have utf8 enabled. 我的pcretesting -C输出说我已经安装了6.6,并且支持UTF-8,但是phpinfo()输出证实了其他人所说的关于apache拥有自己的PCRE版本的内容。我的是5.3的东西..并且它没有启用utf8 。 I tried recompiling PCRE from the Apache source files (mine: /usr/src/httpd-2.2.14/srclib/pcre) but could never get it to work. 我尝试从Apache源文件(我的文件为:/usr/src/httpd-2.2.14/srclib/pcre)重新编译PCRE,但是无法使其正常工作。 (Makefile had a ${top_srcdir} of /build/*, but that variable was never set, so it never 'make'd) anyway... (Makefile的$ {top_srcdir}为/ build / *,但从未设置该变量,因此从未进行过“ make'd”操作)...

I tried several things, but the following finally worked... (Centos Distribution... pcre binaries were in /usr/bin, pcre lib files were in /usr/include... trial and error gave me the --with-pcre=/usr configuration below) 我尝试了几种方法,但是以下方法终于奏效了……(Centos发行版。pcre二进制文件位于/ usr / bin中,pcre lib文件位于/ usr / include中...试用和错误给了我--with- pcre = / usr配置如下)

  • in my apache source folder (mine: /usr/src/httpd-2.2.14/) I did a make clean 在我的Apache源文件夹(我的:/usr/src/httpd-2.2.14/)中,我做了一个干净的
  • looked at the config.log file made from my last apache compile: ... $ ./configure --enable-ssl --enable-dav --enable-so ... 看了我上次apache编译生成的config.log文件:... $ ./configure --enable-ssl --enable-dav --enable-so ...

  • ran the command ./configure --enable-ssl --enable-dav --enable-so --with-pcre=/usr 运行命令./configure --enable-ssl --enable-dav --enable-so --with-pcre = / usr

  • then make && make install 然后进行&&进行安装

no more PCRE errors at the same point I had them before. 在我之前遇到过的同一时间不再出现PCRE错误。

You need to update the regex library. 您需要更新正则表达式库。 It exists outside of the PHP install. 它存在于PHP安装之外。

It looks like this article describes how you can verify this is the issue and how to fix the problem: https://chrisjean.com/2009/01/31/unicode-support-on-centos-52-with-php-and-pcre/ 似乎本文描述了如何验证这是问题以及如何解决问题: https : //chrisjean.com/2009/01/31/unicode-support-on-centos-52-with-php-and -pcre /

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM