How to amend an Application Vault Repository in Plesk

I’m currently building a WordPress Hosting Service where customers get hosting with WordPress pre-installed.

I also want to offer several pre-installed Themes and Plugins that I’ll deploy from the Plesk Back End using Application Vault.

WordPress is already available as a free repository, however it does take some time for new versions to be made available – and of course my Themes and Plugins aren’t there either.

So how can I amend or build a new Plesk Application Vault repository? Let’s find out in this article, in which I’m describing all my findings 😉

Read more

How to upgrade PHP on CentOS 5

With the recent end-of-life announcement it becomes clear that WordPress isn’t going to support PHP 5.1.6. for much longer anymore.

CentOS 5 however comes pre-compiled with PHP 5.1.6 and there are no plans to change this in the current version.

For simple folk like me it’s unimaginable to re-compile the entire OS from source or switch to a different distribution altogether. yum doesn’t help much by default – unless you’re looking in the right repositories.

Help is at hand, courtesy of the 1and1 Knowledge Base. Without further ado, here’s how to upgrade PHP on CentOS 5:

Read more

Linux Disk Space shown as Pie Chart

It's much easier to see a nice diagramme rather than a cryptic line of text from the command line interface

I’m managing a server for Loft London. They’re using it as FTP site for various clients, so I wanted to provide an easy way for them to keep an eye on how much space is used and how much is left.

I’ve done some digging and found this super handy PHP Pie Chart generator by Rasmus Peters. You can call it just like an image, give it some parameters and generate a very cool pie chart diagramme.

My challenge was to use it dynamically by calling the df command on th ecommand line and convert that into a pie chart. Here’s how I did it:

Read more

When Plesk fails to upgrade

I’ve had this issue before: you get a new server, the image is a few revisions behind the current release and your first line of business is to upgrade the system.

A few minutes later you check and find that Plesk refuses to start. Bugger. Now what?

My Customer Support Gurus always know what to do, but in an effort to not disturb them at night here’s what they did to make it all work again. These instructions work on a CentOS 5 system with Plesk 9.0.1 installed.

Read more

How to install Parallels Plesk on a new Linux server

So I’ve expanded my server arsenal to a fifith machine with Strato in Germany. Sadly they only offer an OpenSUSE installation bundled with Plesk (in German – unchangeable to English).

What I really wanted was another CentOS system though, which Strato offer – but without Plesk installed.

After a bit of hackage, I found out that it’s very easy to install Plesk from the command line via the Parallel’s Auto Installer.

These instructions should work on any distribution of Linux – just make sure you download the right auto installer package from the Parallels site (you need to create an account with them and log in for this link to work).

Read more

The “Comber 38” Viagra Hack

Just when I though the Drunkjeans Hack had passed over, there’s another attack on a couple of my sites. I’ll call it the “Comber 38” hack. These hacks are most likely related.

What does this hack do?

With Comber 38, your sites are turned into Viagra Promo sites. Search for “viagra hack” and you’ll see how common this problem is.

Even though your home page may still work, the hackers use your site as a storage for images that can be pulled in from other sites, hence poncing off your server’s bandwidth.

If these files are linked to, your site is redirecting to some viagra site. It gioves the hackers and spammers direct link to a clean site rather than having to use their spam domains directly. If it wouldn’t be so evil, you ould argue it’s a pretty bright idea…

In fact, here’s what’s in one of those files:

Read more

The Drunkjeans.com / Roundstorm.com Hack and how to get rid of it

Saturday morning a couple of my sites were hacked by something I’ve not found a lot of info about. I’ll call it The Drunkjeans Hack. I’ve also found this being inserted from other domains (see below).

Some idiot has inserted a piece of code into the main index.php file that looks like this:

The first line calls a JavaScript file on the given domain, while the second line is a unique identifier (consider yourself an individual).

What this thing does is unclear, but depending on how far the hackers get with this, it could be anything from a wonky homepage to the entire site being down. I did some digging and here’s what I found out:

Read more

Testing HyperDB

I’m as excited as a kid in a candystore! I’ve heard a lot about HyperDB and what can be done with it, and I’ve been thinking how cool it would be to implement it on the sites I’m hosting. And today my friends I’m proud to say that IT WORKS A TREAT!

Hyper What?

Let me tell you a bit about HyperDB. It’s another super cool Automattic project fronted by Matt, Andy, Ryan and Blogluftwaffe. It’s a rather complex plugin for WordPress that will let you specify more than one Database Server. In a high production environment your one and only Database Server can get busy or even crash and die – so all websites would be down until you restart it.

HyperDB solves this by letting you specify several servers in the handy db-config.php file. You can set one as master server for write queries and several others for read queries. This means that the master server doesn’t get bothered with read queries while several other servers can deal with those. If one read server dies, the others can pick up the slack. It’s genius!

The Experiment

Before a general roll-out to live sites a little test might be an idea. Currently I have three servers at my disposal and a dev site for testing. All servers are running CentOS 5 in a mixture of 32-bit and 64-bit installations, with Plesk 9.3/9.5 on them. Here’s my setup:

Read more