Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
rjerome CreditAttribution: rjerome commentedWhat version of PHP are you using?
What Operating System + version?
Comment #2
cfrb CreditAttribution: cfrb commentedDrupal 6.11
Biblio 1.4
Linux kernel 2.6.18-128.1.6.el5
PHP 5.1.6
Apache server
Comment #3
rjerome CreditAttribution: rjerome commentedHmm, 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
Comment #4
cfrb CreditAttribution: cfrb commentedI 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
Comment #5
egfrith CreditAttribution: egfrith commentedI'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.
Comment #6
rjerome CreditAttribution: rjerome commentedI'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.
Comment #7
cfrb CreditAttribution: cfrb commentedThanks Ron, and also many thanks for this great module!