Community

Getting errors during install about preg_match() disallowed Unicode code point

Every time I try and install on my Arch Linux machine I get dozens of these errors:

Warning: preg_match(): Compilation failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 2112 in truncate_utf8() (line 339 of /home/sites/drupal7/includes/unicode.inc).

The Installation seems to complete, and the site seems to be functional, but is there something I can do to fix the warnings?

Comments

The same here

I also get this cryptic warning on Arch Linux, but not on all the sites I run. This leads me to think that's something related to the themes, rather than the httpd/php configuration. The db collation is also the same. The content type of one of the failing site is
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Does it happen to somebody else? Any clue or hint to get it fixed?

I only get it on my local

I only get it on my local machine. I have a server at Linode that is also Arch and I don't get the errors there.

I do use Nginx, PHP-FPM and MySQL on both machines if that means anything.

So it's not apache related

I use Apache and MySQL.

Adaptive Theme

.............. note, recent update on the freebsd server, so likely it was caused by drupal core clashing with the current ports update on freebsd 8.2 stable, using drupal 7, hopefully a mentioned critical fix will address this late March 2012.......... btw, went to drupal 7 dev and it seems to go away... so they hopefully have it patched.

interesting... trying a test site with adaptive theme, corolla, footheme - and then when I use the superfish module and look at configure for a block I see something like it.... strange.

Warning: preg_match() [function.preg-match]: Compilation failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 2112 in truncate_utf8() (line 339 of /var/www/htdocs/drupal7/includes/unicode.inc).
Warning: preg_match() [function.preg-match]: Compilation failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 2112 in truncate_utf8() (line 339 of /var/www/htdocs/drupal7/includes/unicode.inc).

Worked

Thanks all, this worked like a charm:

Line 77 of /sites/includes/unicode.inc, changed:

'\x{F8FF}\x{FB29}\x{FD3E}-\x{FD3F}\x{FDFC}-\x{FDFD}' .

-to-

'\x{D800}-\x{F8FF}\x{FB29}\x{FD3E}-\x{FD3F}\x{FDFC}-\x{FDFD}' .

Jonathan Santos

i did not find this line at

i did not find this line at all to replace it

i am using D6.25 !

can you please help
this error appear to me

warning: preg_replace(): Compilation failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 1816 in C:\inetpub\vhosts\xxx.com\httpdocs\modules\search\search.module on line 333

i solved the problem with

i solved the problem with this solution :

Go to the folder modules / search, open the file search.module.
In line 46 we erase "\ x {D800} - \ x {F8FF} \"

and it will work :)

I started getting this error

I started getting this error yesterday as well. It was after upgrading Apache from 2.2.21->2.2.22. A dependency of this upgrade was PCRE libraries from 8.2.x to 8.3.x. After this upgrade I get:

warning: preg_match() [function.preg-match]: Compilation failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 1811 in /usr/local/www/drupal-6.24/sites/all/modules/ctools/includes/cleanstring.inc on line 157.

My system is FreeBSD, I'm still looking for a fix. Could those of you having this issue check your pcre library versions? It seems like a possibility that 8.3 broke compatibility as it did install libpcre.so.1 replacing libpcre.so.0.

I've recently (last sunday)

I've recently (last sunday) upgraded pcre to 8.30, so it could be.

i noticed this on my freebsd server just now

i hadn't checked /usr/ports/UPDATING
i seemed to fix some problems with ImageMajik on another server by symlinking libpcre.so.0 to libpcre.so.1
maybe it will work in this case too
or if that doesn't work we could just get the old libpcre.so.0 and stick it back in there

20120214:
AFFECTS: users of devel/pcre
AUTHOR: dougb@FreeBSD.org

Until all dependent ports have been updated you should update pcre in
a manner that will preserve its old shared library. For example:

# portmaster -w devel/pcre
or
# portupgrade devel/pcre

I have the same issue.

I have the same issue. Upgraded to pcre-8.30_1, recompiled PHP 5.3.10 but no luck. All Drupal searches are now no longer functioning. This is FreeBSD 7.4-p3. Apache 2.2.22.

Temp. workaround

As a workaround, I've downgraded pcre to 8.21 and manually adjusted the Makefile of apache22 and php5 to link against pcre.0 and NOT pcre.1. Recompile, done, all fixed.

I'm setting up a new machine

I'm setting up a new machine with arch and I run into this problem. My previous arch-box didn't have any of this issues. I hadn't updated it for more than a week so I'm also led to believe that PCRE-8.30 is the problem.

update: I filed a task in archlinux flyspray: https://bugs.archlinux.org/task/28533

--
http://srm.gr - Drupal Specialists in Greece

Maybe it's a bug in drupal?

Hi,

I'm trying to install drupal on a FreeBSD and got this preg error.

I got a workaround (don't know if its a patch), changing in the includes/unicode.inc the line with 0xD800 to:

'\x{E000}-\x{F8FF}\x{FB29}\x{FD3E}-\x{FD3F}\x{FDFC}-\x{FDFD}'

It looks like this line is a filter string for preg, and it's complaining about the 0xD800 part.

This workaround looks also very ugly, but better than the error message.

HTH,

I just got a reply from an

I just got a reply from an Arch dev, I'm pasting it:

At a first glance I'd say this is actually a bug in drupal code. They seem to use invalid characters here. An obvious solution would be to remove them. So in includes/unicode.inc remove "\x{D800}-\x{FFF}" from line 76. You should check back with drupal devs though.

He is also suggesting to fix it from the drupal side. I can't really tell which side is the problematic one, but it seems easier to fix on our side.

update: I created an issue on this matter and proposed a patch. http://drupal.org/node/1446372

--
http://srm.gr - Drupal Specialists in Greece

problem solved

thanks. i didn' find a x{FFF} in out unicode.inc (D7.10) and removed the x{D800} only; that solved the problem for now.

C.H.Riss - www.inostudio.de

error message

I can search users but not content.

I get the error: "preg_replace(): Compilation failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 1816 " ... on line 333 of the search module

Hi, just have a look

http://www.DROWL.de || Professionelle Drupal Lösungen aus Ostwestfalen-Lippe (OWL)
http://www.webks.de || webks: websolutions kept simple - Webbasierte Lösungen die einfach überzeugen!