14
Nov 12

PHP 5.4 and call-time-pass-by-reference

A word of warning. I just updated to PHP 5.4 which broke my installation because call-time-pass-by-reference has been removed in this version. See: passing by reference.

Along with some other functions you shouldn’t be using anymore anyway. See the incompatible list.

For up-to-date plugins and software this shouldn’t be a problem since it was deprecated for a while already.

For me it notably breaks the Feedwordpress plugin in WordPress and gives a fatal error, which is annoying. A simple solution is present but you need to dive into the code and replace a few lines. See the solution here.

I fear older plugins of various kinds are also vulnerable for this problem, so I advice to check your installation locally against a new php version to see if any problems arise before your host decides to upgrade their installation!


08
Nov 12

WordPress Update_option and serialize

I ran into this interesting feature yesterday I was not aware of. If you are trying to put options WordPress using Update_option serializing the data before actually causes unexpected behaviour.

The catch is that WordPress already serializes data send to the function. When invoking get_option the data will be unserialized. Obviously this causes an error if you try to unserialize the whole thing after that.

In short, just push an unserialized array unto update_option and everything will be fine!

 update_option("stuff",array('foo','bar'));
$foobar = get_option("stuff");

See this blog post for more backgrounds.


06
Nov 12

5 things to think about when starting a new site

There are zillions of non-updated and dead sites and most sites could have been a lot better with some consideration.

I have been talking with lot’s of not-internet savvy people looking to jump in online with their own site, either personal or for a small business. Five hings to consider first before even starting a new site.

Continue reading →


20
Oct 12

Using SSHFS for quick updates

If your hosts supports SSH and you have the luck to run your desktop on a linux-based computer there is a quick way to do updates to your site.

SSHFS allows you to use mount a SSH-connection just like you would mount other filesystems. The benefit of this is when, for instance, you need to copy a small amount of files you can do this as a local file operation.

Some might grumble by the idea and of course in a professional production environment ( or large updates ) I would not recommend this. And directly updating (or doing untested stuff) on production systems needs to be grumbled upon in my view.

I use SSH often for small configuration settings or when I need to do small maintenance. SSHFS just give me for these minutes some extra flexibility!


18
Oct 12

Case study: Nieuwszoetermeer.nl

In ‘case studies’ I will every now and then write about a specific site, it’s purpose and what you might learn from this. This could be own work or if I see fit some other pages on the web.

The purpose of NieuwsZoetermeer ( translated: News (from) Zoetermeer ) is to bring all sorts of local news to one page. In my former city local news is scattered around some local paper publications ( with horrible sites ) and ‘amateur’ sites bringing their own local news.

Besides there is no good source for information about the political situation. Like everywhere the traditional media is outside of elections not really interested. For a person who is not bound to one single party this would mean surfing across 10 sites already, just to see if there is local news.

In this post I will explain more about the techniques used behind this site and why.

Continue reading →


14
Oct 12

Moving WordPress from localhost to your host

You have developed a site using a WordPress installation on your local computer and now want to move it to your own domain space? This is a question that pops up a lot on the internet, while in reality it is not that hard to do. Moving WordPress just takes a few steps…

Continue reading →


04
Oct 12

WP Cron – A more reliable execution of scheduled posts and scripts

WordPress features and ‘pseudo’ cron function which loads at a certain interval when people visit your site. The Cron function is modeled after the linux/unix cron function which runs on most servers and check regularly for scheduled jobs to do.

The problem with the WordPress Cron is when nobody for a while visits your site. Or if you have a lot of heavy scheduled work to do this will slow down the user experience of your site.

There is a solution.

Continue reading →


02
Oct 12

Feedwordpress – Linking permalinks and comments to local or remote site?

Feedwordpress is a WordPress plugin which allows easy syndication of RSS-feeds to your blog, sidebar or both.

In Feedwordpress you are presented with the choice between linking to your local post when a excerpt is imported or linking directly to the remote site.

Often you will want to present a link to the original post, but also allow visitors to comments (and ping) on your site. The setting ‘ Point to local comment feeds on this website’ doesn’t seem to do much if you point your permalinks to the original site. This is a quirk which held many, including me, up for a few hours.

Continue reading →