views:

307

answers:

1

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.

A: 

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.

Pekka