Compilation failed: POSIX named classes.. in biblio_teme.inc

cfrb - May 6, 2009 - 12:41
Project:Bibliography Module
Version:6.x-1.4
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Hello,

I just upgraded to biblio 1.4. and encountered the following problem:

warning: preg_replace() [function.preg-replace]: Compilation failed: POSIX named classes are supported only within a class at offset 1 in /mysite.net/modules/biblio/biblio_theme.inc on line 448.

After some Google search I came across this page
http://www.dokeos.com/forum/viewtopic.php?p=5020&

which suggests that \s is more compliant than :space:

and replacing
$space = "[:space:]";
with
$space = "[\s]";

in biblio_theme.inc, line 343 indeed solves the problem.

Is that just me? General fix?

Thanks
Chris

#1

rjerome - May 6, 2009 - 12:58

What version of PHP are you using?

What Operating System + version?

#2

cfrb - May 7, 2009 - 11:41

Drupal 6.11
Biblio 1.4
Linux kernel 2.6.18-128.1.6.el5
PHP 5.1.6
Apache server

#3

rjerome - May 7, 2009 - 14:14

Hmm, that's pretty much identical to the software stack that I'm running on... Of special note is the pcre version, could you check that on your machine.

2.6.18-128.1.6.el5PAE
php-cli-5.1.6-23.2.el5_3
php-mysql-5.1.6-23.2.el5_3
php-pdo-5.1.6-23.2.el5_3
php-devel-5.1.6-23.2.el5_3
php-gd-5.1.6-23.2.el5_3
php-mbstring-5.1.6-23.2.el5_3
php-5.1.6-23.2.el5_3
php-xml-5.1.6-23.2.el5_3
php-pear-1.4.11-1.el4s1.1
php-common-5.1.6-23.2.el5_3httpd-2.2.3-22.el5.centos

pcre-devel-6.6-2.el5_1.7
pcre-6.6-2.el5_1.7

#4

cfrb - May 8, 2009 - 08:21

I have

pcre 6.6 06 here... maybe thats the problem. I am no superuser on my server, so I might not be able to upgrade.

Chris

#5

egfrith - May 8, 2009 - 12:08

I've also encountered this problem. The fix mentioned at the top of the issue seems to work. The versions of php and pcre I'm useing are almost identical (apart from the distro packaging version number) to comment #4.

#6

rjerome - May 9, 2009 - 00:58
Status:active» fixed

I'm not entirely sure why it was only the [:space:] named class that was causing problems, I would have expected it to be all or nothing...

Anyway, I've replaced the [:space:] class with [\s].

Ron.

#7

cfrb - May 12, 2009 - 19:47

Thanks Ron, and also many thanks for this great module!

#8

System Message - May 26, 2009 - 19:50
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.