• Hello. I experience sporadic errors containing the text “Warning: preg_replace(): Compilation failed: lookbehind assertion is not fixed length at offset 10 in /path/to/blog/wp-includes/formatting.php on line 77”

    This only occurs about between every fifth or tenth time i show a specific blogpost, more specifically http://grimstveit.no/jakob/blog/2007/02/08/maybe-its-not-such-a-silly-name-after-all/

    $ uname -a
    FreeBSD hombre.grimstveit.no 6.2-RELEASE FreeBSD 6.2-RELEASE #25: Mon Jan 15 01:58:22 CET 2007 root@hombre.grimstveit.no:/usr/obj/usr/src/sys/HOMBRE i386

    [jakobbg@hombre ~]$ php -v
    PHP 5.2.1 with Suhosin-Patch 0.9.6.2 (cli) (built: Feb 11 2007 18:41:45)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
    [jakobbg@hombre ~]$ pkg_info | grep -e php -e pcre
    pcre-7.0 Perl Compatible Regular Expressions library
    php5-5.2.1 PHP Scripting Language (Apache Module and CLI)
    php5-ctype-5.2.1 The ctype shared extension for php
    php5-curl-5.2.1_1 The curl shared extension for php
    php5-dom-5.2.1 The dom shared extension for php
    php5-exif-5.2.1 The exif shared extension for php
    php5-extensions-1.1 A “meta-port” to install PHP extensions
    php5-ftp-5.2.1 The ftp shared extension for php
    php5-gd-5.2.1 The gd shared extension for php
    php5-gettext-5.2.1 The gettext shared extension for php
    php5-iconv-5.2.1 The iconv shared extension for php
    php5-mbstring-5.2.1 The mbstring shared extension for php
    php5-mhash-5.2.1 The mhash shared extension for php
    php5-mysql-5.2.1 The mysql shared extension for php
    php5-pcre-5.2.1 The pcre shared extension for php
    php5-pdo-5.2.1 The pdo shared extension for php
    php5-pdo_sqlite-5.2.1 The pdo_sqlite shared extension for php
    php5-posix-5.2.1 The posix shared extension for php
    php5-recode-5.2.1 The recode shared extension for php
    php5-session-5.2.1 The session shared extension for php
    php5-simplexml-5.2.1 The simplexml shared extension for php
    php5-spl-5.2.1 The spl shared extension for php
    php5-sqlite-5.2.1 The sqlite shared extension for php
    php5-tokenizer-5.2.1 The tokenizer shared extension for php
    php5-xml-5.2.1 The xml shared extension for php
    php5-xmlreader-5.2.1 The xmlreader shared extension for php
    php5-xmlwriter-5.2.1 The xmlwriter shared extension for php

    Error occurs also when no plugins are loaded.

    Found a similar bug at http://bugs.php.net/bug.php?id=38327 – but assume that has not got anything to do with it.

    Line 76-78 in file referred to above:

    $pee = preg_replace(‘/<(script|style).*?<\/\\1>/se’, ‘str_replace(“\n”, “<WPPreserveNewline />”, “\”)’, $pee);
    $pee = preg_replace(‘|(?<!
    )\s*\n|’, “
    \n”, $pee); // optionally make line breaks
    $pee = str_replace(‘<WPPreserveNewline />’, “\n”, $pee);

    Thanks in advance – I have no clue what may be causing this. PHP or WordPress?

Viewing 2 replies - 1 through 2 (of 2 total)
  • This seems to have started when I upgraded PHP5 to 5.2.1 under FreeBSD 6.2 (same version/platform as yours). Seems to be very unstable as well. I think it may be tracked to pcre, the Perl-compatible regular expression library, but I don’t know enough of PHP internals to find out. preg_replace() calls the pcre, I think.

    This started when PHP upgraded to 5.2.1 and is still broken

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘preg_replace: Compilation failed: lookbehind assertion is not fixed length’ is closed to new replies.