试图在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
尝试从最近2天以来,我把我的PHP从5.1升级到5.3,但仍然得到同样的错误。根据我的问题是phpinfo()中的PHP的PCRE模块表示是sep 2004.下面是实际的行
PCRE Library Version 5.0 13-Sep-2004
任何人都可以告诉我如何升级它或WET解决问题的方法。
谢谢。
我为我的系统重新编译PCRE以包含PCRE UTF-8
我们使用PHP 5.2.6 atm,但造成Kohana失败的是pcre rpm。
[root@v1e-web1 files]# cat /etc/redhat-release CentOS release 5.4 (Final) [root@v1e-web1 files]# uname -a Linux v1e-web1 2.6.18-164.el5 #1 SMP Thu Sep 3 03:33:56 EDT 2009 i686 i686 i386 GNU/Linux
http://digirev.us/files/RPMS/pcre/
也许这些文件将有所帮助。
另外一个select – 除了升级CentOS 5安装的PHP版本(这在你看来是痛苦的),就是使用我的Kohana版本作为CentOS 5 (不pipe文字说什么 – 版本库保持最新与当前版本是当前Kohana稳定的3.0.8版本)。
Kohana软件堆栈在本发行版中进行了修补,以在PHP 5.1.6的香草CentOS 5上开箱即用。 几乎没有function损失(主要问题是PHP 5.1的错误报告并不好),并且被广泛testing,因为几个不同的人在运行不同的应用程序时使用它。
没有办法解决这个原始的Centos 5包。
这不是问题,这是一个function。
您需要重新编译和升级软件包,或者使用另一个存储库,例如remi或EPEL 。
尝试首先使用EPEL,它使用php 5.3作为php-53 *:yum remove php; yum install php53
然后添加 REMI回购,它带有PHP 5.4作为php- *:yum删除php53; yum安装php