Using WordPress plugin CodeColorer under PHP 7

I decided to upgrade my web server containers to PHP 7 but ran into a problem with WordPress, all articles had no text. The problem seemed to be within the plugin CodeColorer since disabling it resolved the problem PHP Warning: &nbsp;preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /var/www/wp-content/plugins/codecolorer/codecolorer-core.php on line 50 In wp-content/plugins/codecolorer/codecolorer-core.php locate this code block: /** Search content for code tags and replace it */ function BeforeHighlightCodeBlock($content) { $content = preg_replace('#(\s*)\[cc([^\s\]_]*(?:_[^\s\]]*)?)([^\]]*)\](.*?)\[/cc\2\](\s*)#sie', '$this->PerformHighlightCodeBlock(\'\\4\', \'\\3\', $content, \'\\2\', \'\\1\', \'\\5\');', $content); $content = preg_replace('#(\s*)\<code(.*?)\>(.*?)\</code\>(\s*)#sie', '$this->PerformHighlightCodeBlock(\'\\3\', \'\\2\', $content, \'\', \'\\1\', \'\\4\');', $content); return $content; } and replace it with this ...

August 6, 2016 · 1 min · alj

Desktop wallpapers

My collection – Enjoy. (This is the same folder I use for randomized backgrounds on my computers)

February 16, 2014 · 1 min · alj

nowhere.dk outage 2013-03-03

Nowhere.dk (the entire domain) was offline today from 09:47 to 10:46 UTC follwing a major outage at Cloudflare.com. Points to Cloudflare.com for releasing a full incident report.

March 3, 2013 · 1 min · alj

Switched to nginx

Nowhere.dk has been moved to nginx (with php5-fpm) and most things seem to be working. There is one problem though. It seem that some of the older articles are indexed as /articles/-title-/index.php (which is sort of wrong) and accessing that type of URI results in a blank page. The problem seem to be that I’ve configured nginx to serve file in this order: location / { try_files $uri $uri/ @rewrites; } In theory it should then be a matter of defining the right rewrite ...

June 19, 2011 · 1 min · alj

Performance

The performance of the site should have increased considerably – but since it meant disabling WordPress HTTPS you will probably see a warning about all elements of the page not being secured; I am working on that.

February 21, 2011 · 1 min · alj

Firewall trouble

It might seem as if Nowhere.dk has been out of commission for a while. That is not the case – but a firewall configuration error (on my part) accidently blocked port 80; an error I did not see since I always use SSL. Sorry, Allan

January 11, 2011 · 1 min · alj

Season's Greetings

Have yourselves a merry little Christmas.

December 24, 2010 · 1 min · alj

www.nowhere.dk is now using SSL

While my site might not be as important or visited as Google or Facebook, I decided to switch it to SSL. Some pages will show an “error” in the browser because not all content is encrypted (external images); I hope I’ll get that fixed some day.

November 12, 2010 · 1 min · alj

I'm not dead

But I haven’t really had anything to write about. I assure you, if anything pops up, I will make a real blog post :) My Twitter account is updated somewhat regularly and I post less important stuff (mostly links to stuff) on Tumblr.

September 30, 2010 · 1 min · alj

www.nowhere.dk is now IPv6 enabled

Just a quick note to let you know that www.nowhere.dk is now accessible through IPv6 $ host -t AAAA www.nowhere.dk www.nowhere.dk CNAME coredump.nowhere.dk coredump.nowhere.dk AAAA 2001:2010:0:2:0:0:0:DEAD The only thing I had to do was to enable IPv6 in Lighttpd, enable IPv6 in ufw (done in /etc/default/ufw) and then re-add any rules to ufw that affect IPv6 (like web and ssh). The last part is crucial and not very well documented.

March 13, 2010 · 1 min · alj