English 中文(简体)
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.

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

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.

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.

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. 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. (Makefile had a ${top_srcdir} of /build/*, but that variable was never set, so it never make d) anyway...

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)

  • in my apache source folder (mine: /usr/src/httpd-2.2.14/) I did a make clean
  • looked at the config.log file made from my last apache compile: ... $ ./configure --enable-ssl --enable-dav --enable-so ...

  • ran the command ./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.

You need to update the regex library. It exists outside of the PHP install.

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/





相关问题
Using SimplePie with CodeIgniter and XAMPP

I am using CodeIgniter 1.7.2 with XAMPP 1.7.2 on a Windows computer. I am trying to make use of SimplePie. I followed all the instructions I could find: a copy of simplepie.inc is in my applications/...

Multiple Sites with common files

I have developed over 50 sites that all use the exact same files other than CSS and IMAGES, I currently duplicate the files each time I create a new site and upload different css and images. What ...

http server validation

I finish a litle http server, writing from scratch. I would like to be sure that my imlementation is conforme to the HTTP specifications. W3C give us tools for HTML/XML conformance, but i see nothing ...

热门标签