Yearly Archives: 2011

What’s the full path to php in CentOS?

The path to PHP is


This is good to know if you need to setup a cron job which triggers a PHP file. Calling it from a web browser directly is not a problem, but if you have to call it from the command line or as a scheduled task you need to call it with

/usr/bin/php yourfile.php

You can also use wget or cURL but that’s often not reliable.

If your PHP file gives you an output (usually to the browser screen), your server will send you an email. If you;d rather this didn’t happen, direct it to nowhere like so:

/usr/bin/php yourfile.php > /dev/null 2>&1

How to avoid emails from Dr. Web

Dr. Web is a Russian anti-virus utility that comes bundled with Plesk. It’s good and it tries to keep the bad guys out.

To keep up with all the mutations out there it tries to update itself frequently. B default, Plesk sends the system admin an email when this happens – no matter if Dr. Web was successful or if there was a problem.

This is what a sample email looks like:

Multiply that email by the number of servers you’re looking after, and you’ll soon have an overflowing inbox.

Here’s the solution: tweak a system file and divert those emails to nowhere.

Continue reading How to avoid emails from Dr. Web

Say hello to WP Hosting

After well over a year I am very pleased to share with you our latest business venture:

WP Hosting – the easiest way to get a self-hosted WordPress site.

WP Hosting has been in the making for quite some time, and what better way to make its launch coincide with the release of WordPress 3.3. With it come some fundamental changes to the way we do things here – let me explain the details.

Continue reading Say hello to WP Hosting

How to install OSSEC HIDS on CentOS 6 and 7

Remote computers are under constant attack by Evil Dudes – that’s especially true for Linux servers. To prevent such attacks by Evil Dudes from Hacker Land, I’ve been relying on the amazing OSSEC Host Intrusion Detection System on all my machines.

Even though the OSSEC website is great, I always forget the simple steps that are involved in getting it up and running on a brand new server. Here are the steps that work for me.

I’ve originally written this article in 2011 for OSSEC 2.6, but I’ve just updated and tested the instructions again with OSSEC 2.8.1 on CentOS 7. It’s my go-to guide on how to get OSSEC up and running. However, by the time you read this it may all be completely out of date – please bear that in mind. Thanks 😉
Continue reading How to install OSSEC HIDS on CentOS 6 and 7

How to install Plesk on CentOS 6

The other day I got myself a brand new server – so barebones that I had to do everything myself, including picking a Linux distribution. Sadly the one I wanted (CentOS 6) did not come bundled with Plesk so I had to install it manually.

I thought I’d better take some notes so I can retrace my steps.

At the time of writing, Plesk 10.3 is current, with 10.4 just around the corner. Keep this in mind – things tend to change drastically with every major release.

Continue reading How to install Plesk on CentOS 6

What exactly is a Blog?

I’ve written this in response to a question on The 30 Day Challenge, in which I will be answering web related question throughout October. The question was “what exactly is a blog” in particular as a possible starting point to write a book – I hope you find this useful 😉

Blogging is an awful term I find, and it really doesn’t explain very well what it actually is and how useful it can be to oneself. Let me see if I can explain this.

The word blog is short for weblog and has started as an online journal many years ago. All you could do was write up a diary entries and share them with the world. Many people still do it just for that, but of course you can share any writing / picture / video combination nowadays.

What made blogging popular was the addition of a comment field at the bottom, so other people could interact with your particular entry. Continue reading What exactly is a Blog?

Which blogging platform should I go with?

There are so many content management systems (or blogging platforms) on the market, many of them offer a free service. Some of them that spring to mind are these:

  • Blogger (by Google)
  • WordPress
  • Live Spaces (by Microsoft, now defunct)
  • Movable Type
  • Type Pad
  • Joomla
  • Drupal

The choice is endless and the list could go on – but only two are serious candidates, at least for me. This comes down to personal preference and I encourage you to try them all… but who has the time to do that?

Let me explain the differences.

Continue reading Which blogging platform should I go with?

How to rename your iOS App in Xcode 4 (and remove the Gloss Effect from your Logo)

Slightly off topic – but just so that I don’t forget:

  • Find the -info.plist file (in the Supporting Files folder). Say your app is called MyApp, then you’re looking for a file called MyApp-info.plist
  • Say hello to a meaningless list of code
  • In here, find the Bundle Display Name
  • Change it from the default ${PRODUCT_NAME} to your title
  • Build and see your title underneath your logo
While we’re at it, by default Xcode adds a shiny gloss effect to your logos. Looks great most of the time, but if you don’t like it here’s how to remove it:
  • While you’re in info.plist, see you can find an item called UIPrerenderedIcon
  • If not, go to the bottom of the list and add an item (click on the PLUS sign)
  • call it UIPrerenderedIcon
  • the item changes into “Icon already includes gloss effect”
  • this means that if set to YES the gloss will be removed  (NO means gloss is switched on)
  • build and see your logo without gloss effect
Happiness – at least as much as you can have hacking code….

Snapshot Backup 2.0.1 Update: Let’s try this again, folks…

I’ve just released Snapshot Backup 2.0.1 – the exact same version as 2.0, however this time it includes all the files it actually needs…

Let me explain what happened earlier:

So there I was, having tested the latest version of Snapshot Backup 2.0 for several weeks, all is well at my end, and I decided to release it to the public. After over 11.000 downloads it gets the long awaited automation feature, revamped menu structure and gets its own branding. How exciting! You should all finally have it, it’s been a long wait.

I uploaded the changes using Subversion, and thanks to Tortoise SVN I can do this with a right click from my Windows 7 machine. It’s all so much easier than hacking away on my development server via SSH. Ever so pleased I decided to treat myself with a Mac Book at the Apple Store in Covent Garden – let the iOS Development begin!

Shortly after I had arrived in town all your kind comments kept flooding in: some files were missing in 2.0 which Tortoise SVN didn’t import properly, and hence 2.0 was only 80% of what it should have been (read: 100% unusable).

Thank you to everyone who broght this to my attention, I’m really sorry I couldn’t rectify this before tonight when I got back home.

Continue reading Snapshot Backup 2.0.1 Update: Let’s try this again, folks…

Disk Space Pie Chart – Version 0.4

I’ve committed a new version of Disk Space Pie Chart today.

This maintenance release fixes a display bug in the Dashbaord Widget in WordPress 3.2. Thanks to Dan from IFSA Butler for bringing this to my attention.

While I was at it I’ve also fixed some of the internal workings of this plugin:

  • Fixed dashboard widget display in WordPress 3.2 (Thanks Dan!)
  • Replaced hard coded links with dynamic ones
  • Updated Folder Structure in accordance with WordPress Best Coding Standards
  • Added default unit value for first-time-user (now defaults to GB rather than nothing)
  • Changed Donation Link (Buy me a Coffee now goes to this website)

You can download Version 0.4 from the official WordPress Repository or use the automated upgrade option.

Have fun 😉