Friday, March 6th 2009

Changing the default SSL certificate in Plesk
posted @ 6:16 am in [ Fixing Things -Media Temple -Technology -Web Design ]

Plesk as provided by Media Temple on all it’s servers is great, however I do ocassionaly get the ‘where the heck is button to do that’ feeling with it and as much as I try the very feature I’m looking for is there, just hidden away.

One that has thwarted me a number of times is how to change the default SSL certificate for a domain when you install a new SSL certificate. You would have thought Domains -> Certificates, or Server -> Certificates -> Make Default would do the trick, but nope neither works.

However… if you click on Server -> IP Addresses ->  <Your IP Address> -> you get the ability to select which SSL ceriticate you want for the server et voila job done.

No if only that was easier to find (hence why the Abridged Learnings lives :-))

Tuesday, January 27th 2009

HSBC XML API for OSCommerce based systems
posted @ 2:24 pm in [ osCommerce -PHP -Technology -Web Design ]

We recently developed an XML API for connecting to the HSBC bank in the UK for OSCommerce based systems which is free for everyone to download, update and even improve. I forgot to post a link to it so here it is and it should help everyone who wants to use them get up to speed pretty quickly


Support Forum:

Wednesday, October 22nd 2008

Running Java servlets and Java application servers on Media Temple DV Servers
posted @ 5:29 am in [ Fixing Things -Media Temple -Technology -Web Design ]

I’ve always had problems trying to run Java based application servers on Media Temple Dedicated Virtual Servers (DV Servers), as although they have lots and lots of disk space and bandwidth, they seem to have very small memory spaces that you can run containers in.

Java by default powers up with about 1024Mb of memory requirements, so if you are installing Apache Tomcat (java servlet engine) or Red 5 (Open Source Flash Video server – very good, try it out) you have to seriously reign in the memory these guys try and use when powering up.

For reference the best way to achieve this is using the -Xms and -Xmx parameters, so in my case I added the following to the script for Tomcat

JAVA_OPTS=’ -Xms128M -Xmx128M’
export JAVA_OPTS 

Ideally I’d like a bit more memory to play with, but at least it works like this and the old application I’m supporting can run 🙂

Sunday, September 14th 2008

Snaz – mobile shopping
posted @ 5:21 am in [ Flash -iPhone -Javascript -Mobile -Technology -Web Design ]

I was tidying up an old hard-drive I had today, and came across this article from New Media Age where we talked to them about Snaz, our mobile shopping solution from the days of early .com

 Interestingly the idea is still good, however now that the browsers on phones are so good that they can run Javascript and interpret style sheets, the need for rendering on the fly is a little defunct.

Still it’s funny how the world goes 360 and we are now at Skywire producing iPhone and Blackberry friendly versions of our clients’ websites, which have their own detection code, as the iPhone can’t run Flash at the moment and the Blackberry’s rendering engine is terrible!

Snaz : New Media Age

Thursday, August 14th 2008

HSBC Module for OSCommerce with XML API
posted @ 9:11 am in [ osCommerce -PHP -Technology -Web Design ]

I’ve been meaning to write about this one for a while since we did it, but we’ve written a fully XML API compliant OSCOmmerce payment module for the HSBC bank in the UK.

It is based quite heavily around the Protx Direct XML module which uses very similar techniques to POST data to the payment servers in XML, and then to decode the XML response in PHP for the OSCommerce system.

I’d like to improve the features when we have more time and allow refunding and voiding _directly_ from the OSCommerce administrator interface, rather than as current where you have to login the the HSBC interface separately to do this, but that’s all about time which is a precious commodity at the moment 🙂

The module can be downloaded from here and the support forum is here

Friday, April 18th 2008

Configuring your iPhone for T-Mobile
posted @ 10:20 am in [ Fixing Things -iPhone -Mobile -Technology ]

My iPhone is on T-Mobile as the ex-owner wanted to keep the O2 number that came with it, and I have a corporate account with T-Mobile.

All works nicely, but obviously you want to configure your T-Mobile account to mimick the default iPhone account that it originally came with, so here’s what you need.

1. T-Mobile Web & Walk

You need to add the very reasonable £7.99 package to your account and wait a few hours for it to be activated, then you get up to a Gig of data a month (I believe) to play with.

2. Configure the EDGE settings on your iPhone

Settings -> General -> Network – EDGE

Username = user
Password = pass

et voila – off browsing we go when we’re away from the wireless network!

Thursday, April 10th 2008

More Media Temple D/V: Installing YUM (Yellow dog Updater, Modified)
posted @ 7:08 am in [ Media Temple -Technology -Web Design ]

I know I said below that you can just Google how to do this, but then I had to do it again today on a client’s server, and actually nobody has the correct instructions for the 4.5 version of CentOS that is installed on Media Temple Dedicated Virtual servers (D/V) by default.

So, the basic principle is that YUM needs sqlite, the sqlite libraries for python, a few other python things like elementtree and urlgrabber and then YUM itself. Grab the libraries you want from the CentOS vault and then install them (you need to get your root password for this – control panel request the lovely people at M/T if you don’t have it) and the rest should be easy….

export MIRROR=
wget ${MIRROR}python-sqlite-1.1.7-1.2.1.i386.rpm
wget ${MIRROR}sqlite-3.3.6-2.i386.rpm
wget ${MIRROR}python-urlgrabber-2.9.8-2.noarch.rpm
wget ${MIRROR}python-elementtree-1.2.6-5.el4.centos.i386.rpm
wget ${MIRROR}yum-2.4.3-3.el4.centos.noarch.rpm
wget ${MIRROR}libxml2-python-2.6.16-10.i386.rpm
wget ${MIRROR}rpm-python-4.3.3-22_nonptl.i386.rpm

rpm -Uvh python-elementtree-1.2.6-5.el4.centos.i386.rpm
rpm -Uvh python-urlgrabber-2.9.8-2.noarch.rpm
rpm -Uvh sqlite-3.3.6-2.i386.rpm
rpm -Uvh python-sqlite-1.1.7-1.2.1.i386.rpm
rpm -Uvh rpm-python-4.3.3-22_nonptl.i386.rpm
rpm -Uvh libxml2-python-2.6.16-10.i386.rpm
rpm -Uvh yum-2.4.3-3.el4.centos.noarch.rpm

Bing! YUM ready to roll and add all those other things you need (for us were installing MySQL 5 so that we can have VIEWs :-))

Wednesday, March 26th 2008

Media Temple and PHP5 cooking tips…
posted @ 12:05 pm in [ Apache -PHP -Technology -Web Design ]

I know I know, nobody really wants to run PHP5 on their Media Temple Dedicated Server when PHP4 works just fine – well actually yes we did as one of our team is becoming a dab hand at writing PHP5 dependant classes and then having to find servers to run them.

Media Temple provide their own link on how to upgrade the system ( however this was having none of it for us so here’s a quick heads-up on how to do it our way.

1. Install YUM

There’s a few great articles on how to do this on the web (Google for CentOS and YUM) but the trick is to remember when you have it installed is that the packages missing from the central CentOS distribution can still be accessed with YUM you just need to use CentOSPlus.

yum --enablerepo=centosplus install <your package name>

2. Roll your own PHP 5

Download the latest PHP tar ball, unpack and start configuring. Here’s our config file which will help you build in all the dependencies that Media Temple has (zend, mysql, zlib etc.) – you will need to use YUM to get various packages and libraries, and some have to be located on the source websites, but here’s a hints to help.

– installing mcrypt


 rpmbuild -ta libmcrypt-2.5.7.tar.gz

 rpm -ivh /usr/src/redhat/RPMS/i386/libmcrypt-2.5.7-1.i386.rpm /usr/src/redhat/RPMS/i386/libmcrypt-devel-2.5.7-1.i386.rpm

 yum --enablerepo=centosplus install php-mcrypt

– installing mhash


 bunzip2 mhash-0.9.9.tar.bz2

 tar xvf mhash-0.9.9.tar

 cd mhash-0.9.9


 make install

– configuring php5
























































Restart your PSA system (

/usr/local/psa/admin/sbin/websrvmng -a -v

) and you should be cooking on a lovely PHP 5 install with everything else still as it was.

Wednesday, March 12th 2008

Recursive ftp with wget
posted @ 10:49 am in [ Apache -PHP -Technology -Web Design ]

Sometimes when the servers won’t give you ssh access, and you want to copy files from one machine where you don’t have ssh access to one that does, recursive ftp with wget is the answer

wget -r ftp://username:[email protected]/directory

For example to get all the files from my server at with username fish and password cakes, in my homedirectory I would use

wget -r ftp://fish:[email protected]/~/*

Prolem solved…

Monday, April 30th 2007

White noise jpg fading problem in Internet Explorer 6
posted @ 5:23 am in [ Javascript -Prototype Library -Technology -Web Design -Web2.0 ]

You wouldn’t believe it was true, but there is an incredibly annoying problem in Internet Explorer 6 (IE6) where fading out jpg images using nice libraries like or prototype.js gives a strange ‘white noise’ effect on the image during the transition.

Well, it turns out it is actually a bug in IE6 where it takes true-black colours in JPG images to be transparent, and thus shows the background colour behind it when fading the image (in our case white).

So how to work around it?

Easy – go into Photoshop and adjust the levels to remove the true black in the image – Image -> Adjustments -> Levels and slide the true black slider 1 or 2 pixels to the right. Save out your image again and the jpg artifacts are gone.

Weird but true! and here’s the pointer I found to solve the problem from a Slimbox forum

– SNIP –

“white noise”: After making some tests with images showing the problem, I’ve come to the conclusion that:

– It is NOT related to the software generating the images.
– It shows in totally black areas of a jpeg image in Internet Explorer only.

It’s like the black portions of the images are interpreted as transparent by IE, so the background color (white by default) shows through them. So far I’ve only seen this happening in Internet Explorer (both IE6 and IE7). Thank you Microsoft for making the lives of web designers and programmers so fun.