/0

Category: ‘Wordpress’

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 <line-number>

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:

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

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

All content and images (unless otherwise stated) copyright © 2010 Division By Zero - Credits