Division By Zero

Warning: Compilation failed in WordPress

I recently came across a strange new error message on a new install of WP 2.8.3

Warning: Compilation failed: characters with values > 255 are not yet supported in classes at offset 16 in wp-includes/shortcodes.php on line

From what I’ve read on various blogs, forums and articles this problem occurs when running an older version of PHP with an out-of-date PCRE library. PHP should come with it but sometimes is compiled with really old system versions that are on the server. That’ll teach me to install on a 4 year old server!

Thankfully the fix is fairly simple.

Open up shortcodes.php and find the function named shortcode_parse_atts. Replace the preg_replace line with the following:

$text = preg_replace("/[\x{00a0}\x{ff}]+/u", " ", $text);

So in future kids, make sure you’re running PHP5 compiled with it’s own libraries, not out of date system ones!

Spread the word

If you like what you've read, help spread the word on Twitter, Digg, or any of your favourite social sites. Knowledge is power.

About the author

Jonathan Phillips is the founder and main author here on Division by Zero. A PHP developer by trade, Jonathan spends his days building and marketing websites and the rest of the time coming up with ideas for websites and businesses he hasn't got time to implement.

1 Comment

  1. Andy 1
    August 21, 2009
    at 8:57 am
    Reply

    Thanks For this!!

Leave a comment

* denotes a required field

Don't worry, your email address etc. is safe, we won't share it with anyone.

Copyright © 2009 - 2010 Division By Zero - Credits