PCRE_UTF8 solution for VPS servers | FreeBSD

installation PROBLEMS? - PCRE_UTF8 support on VPS server accounts? Look here!
I receive the same error on every page with a basic install however everything seems to be functioning otherwise fine.

warning: preg_match(): Compilation failed: this version of PCRE is not compiled with PCRE_UTF8 support at offset 0 in /home/brandform/www/drupal.brandform.net/includes/unicode.inc on line 32.

The solution was much more difficult to find than i had hoped so maybe this post will be useful to some others as well.
I had to uninstall the pcre package and reinstall the proper one with utf-8.
heres the procedure:

login to server via shell,
on VPS2 accounts,
# su root
then type password
basically you want to be root user.
then type:
# pkg_info
which will show you the installed packages.
type:
# pkg_delete pcre-6.4
for me it was 6.4 but yours may be different. make sure to enter the proper version of pcre displayed in pkg_info.
then you want to change to the directory where your ports collection is.
on FreeBSD it is:
/ports/devel/pcre-utf8
so type into your shell prompt:

# cd /
# cd ports/devel/pcre-utf8
# make
# make install
# make clean

then youll want to restart the apache server...
something like this:
# restart_apache

thats it...
fixed everything for me.
after over a day of pulling my hair out and almost abandoning the effort......

great solution

Sam Moore - April 26, 2006 - 22:20

Worked pretty well in Centos too -

rpm -q pcre to find out what version you have (I had 3.something)
rpm -e pcre removed it (miraculously, no dependency issues!)
then searched on rmpfind.net to get pcre 5.x and install it.
Restared Apache just for giggles, and now - no more PCRE complaints :-)

How is this For Linux

quineto - May 5, 2006 - 06:02

I am using Linux and i am having the same warning but the commands listed here are not for this OS

for this PCRE UTF8 warning , I guess is related with the php version and how it was compiled but i haven´t found a fix for this

u guys have any idea?

thanks

Centos = RedHat linux

Sam Moore - May 5, 2006 - 15:17

From the Centos site (www.centos.org):
CentOS is an Enterprise-class Linux Distribution derived from sources freely provided to the public by a prominent North American Enterprise Linux vendor.

So - try the rpm solution i posted above.

FC6 - pcre-6.6-1.1

Kevin Lidh - December 7, 2006 - 14:39

I'm getting the same error and I have probably the latest version of pcre. When I run pcretest -C I get:

PCRE version 6.6 06-Feb-2006
Compiled with
UTF-8 support
No Unicode properties support
Newline character is LF
Internal link size = 2
POSIX malloc threshold = 10
Default match limit = 10000000
Default recursion depth limit = 10000000
Match recursion uses stack

This seems to indicate that it was compiled with UTF-8 support. I'm running Fedora Core 6 x86 and PHP version 5.1.6. I thought about removing the 6.6 version of the RPM and installing the 5.0, since that worked for the previous poster but I do have dependencies with some other packages.

pcre-7.0

earnie - May 18, 2007 - 20:22

I'm beginning to think there is a compatibility problem for the ext/pcre of php-5.x. I've been doing some research and it seems to be the most likely case that ext/pcre needs some patching in the php source.

BTW, this is a duplicate of http://drupal.org/node/97673.

Earnie -- http://for-my-kids.com

 
 

Drupal is a registered trademark of Dries Buytaert.