Hi,
I just updated to 6-1.3 and get the following error message in the log whenever i visit a biblio page.

preg_replace() [<a href='function.preg-replace'>function.preg-replace</a>]: Compilation failed: support for \P, \p, and \X has not been compiled at offset 7 in /var/www/virtual/ahfr/modules/biblio/biblio_theme.inc on line 392.

Can't make any sense of it. Is there something wrong with my php installation (support for \P, \p, and \X has not been compiled)? Using php 5.2.4

Many thanks,
Matze

Comments

rjerome’s picture

What OS are you running that on?

PHP 5.2.4 should support that (see http://php.net/manual/en/regexp.reference.php#regexp.reference.unicode). It may be a an issue with how the underlying PCRE library was built.

matze_’s picture

The Server is running:
Mandriva Linux 2.6.22.19-desktop-2mdv #1 SMP
Apache/2.2.6 (Mandriva Linux/PREFORK-8.1mdv2008.0)

Unfortunately I have no way of changing any of that.

I had a look at the changes in biblio_theme.inc (http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/biblio/bibl... ) and noticed the changes in the unicode stuff, I see the \p and \P but have no idea what it does.

Is it the way php was compiled?

rjerome’s picture

You might want to check out this site... http://gaarai.com/2009/01/31/unicode-support-on-centos-52-with-php-and-p... it details how diagnose and fix the issue.

matze_’s picture

Thank you Ron.
I'll talk to the server admin about this, won't be easy to get him to change that :-(

The site seems to be working fine, just the errors in the log.
What is my chance if i change these unicode lines back to what they were in 6-1.2? Will that work?

rjerome’s picture

Welllll, it will eliminate the errors, but it could cause you some grief. What was there before was not for Latin-1 characters not UTF-8, and Drupal saves everything as UTF-8 so you'll likely bump into so issues at some point.

Changing the library is really not that big a deal, I did it on my CentOS server already. CentOS was not quite so crippled as Mandriva, it was just silently ignoring those expressions :-(

rjerome’s picture

FYI, Since I have to release a new version (1.4) due to another major bug, I have added a test to see if the PCRE library can deal with UTF-8 characters and if not, it uses some alternatives. This should address your issue without having to change the libraries on the server.

I did this because, no doubt, there will be others who run into the same issue.

Ron.

matze_’s picture

Status: Active » Fixed

Thats great. Thank you very much.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.