Archive: August, 2009
Google Gets a Caffeine Boost
by Jonathan on 12th Aug 2009 in Google
Google has launched a beta of an upgraded search which it claims will make your search a whole lot faster.
It’s available to try now at http://www2.sandbox.google.com.
Warning: Compilation failed in Wordpress
by Jonathan on 11th Aug 2009 in Development, PHP, 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!
How to do Conditional Inserts in MySQL (INSERT … WHERE NOT EXISTS)
by Jonathan on 11th Aug 2009 in Development, MySQL
At some point or other everyone needs to perform a conditional INSERT; one that is only executed after checking if the data is already in the database – so here’s how.