Linux application/script debugging with ‘strace’

Every now and then, you'll encounter a problem with an application or a script that is not clear straight away. After the normal troubleshooting, it can be helpful to see the actual system calls that occur when that script executes. Using a tool like strace (manpage) can help you in identifying what is causing the system to slow down or misbehave.

In this blogpost I'll show you some examples where strace can be useful for you. Most of it will be with PHP code but they're easy enough anyone can understand them. Continue reading

Posted in linux, programming | Tagged , , | Leave a comment

WordPress plugin: undo the default WordPress formatting (single/double quotes/dashes)

I've been cursing at this quite often. Since this is a tech-related blog with code snippets, command line arguments, ... running it on wordpress means that it always results in having characters replaced by the WordPress default formatting. In the end, that means that a single quote ' or a double quote " would always get replaced by a better-looking HTML character. That made copy/pasting from this blog to a terminal near impossible.

Previously, I would just hack the WordPress core (for WordPress 3.3 and 3.2 or 3.1) by editting some files. But any update would of course undo my change, since hacking the core of anything makes kittens cry. Continue reading

Posted in Technology, Webdevelopment | Tagged , , | Leave a comment

Plesk: Postfix & authenticated SMTP on an alternative port – login failed, generic failure

If you want to run your Postfix config in Plesk on an alternative port and still have authenticated SMTP as a possibility, you need to make a small change to the Postfix config.

The KB to add an extra SMTP port to Postfix says to add the following in your Postfix's master.cf file. Continue reading

Posted in Plesk | Tagged , , , , | Leave a comment

WordPress 3.3: Stop replacing double dashes and single quotes

Oh boy, another update to WordPress, another set of changes to the WordPress core to prevent WordPress from changing the default double dash and single quote characters to the "pretty" HTML versions &#8217, &#8216, &#8211, &#8212, ...

When posting snippets of source code or command line arguments, having the quotes and dashes replaced makes copy/pasting the commands a pain, as your terminal won't recognise them. Continue reading

Posted in php | Tagged , | 2 Comments

2011: An overview of projects & popular blogposts

Since it's the end of the year, time to make a few lists of my own. Here are my top blog articles from 2011. Continue reading

Posted in About me | Tagged , | Leave a comment