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

Comments

rjerome’s picture

What version of PHP are you using?

What Operating System + version?

cfrb’s picture

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

rjerome’s picture

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

cfrb’s picture

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

egfrith’s picture

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.

rjerome’s picture

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.

cfrb’s picture

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

Status: Fixed » Closed (fixed)

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