Installing Zend Optimizer Red Hat Enterprise Linux 5

24 08 2010

I recently had to install Zend Optimizer for a client using a particular WordPress plugin on one of the hosting severs I run. The plugin was encoded with Zend Guard and the optimizer provides run time decoding as well as some (questionable in my opinion) performance optimizations.

All my hosting servers run Red Hat Enterprise Linux and Plesk as the hosting control panel so I set about looking up something a little more informative than Zends pathetic notes on installation. This is where I started to come a little unstuck and found myself going backwards and forwards between different sets of installations instructions and a segmentation fault problem. Now typically when I get to this point I remember that Atomic Rocket Turtle has usually not only been there and done that, they also have a installation for it and a simple yum repo waiting, as always they did. I wont detail this method as its easy to find and anyone who should be doing it will know what to do and where to look.

After installing Zend Optimizer via Atomics repo I then looked at what it had actually done, to reverse engineer the install if you like, this I hoped would leave me with a simple way to install the required module without having to add the Atomic repos to servers that are under full patch management.

So  here are my simple notes.

These are based on using Red Hat Enterprise Linux 5 (or equivalent CentOS 5), PHP 5.1 (the standard PHP build for this distro) and Plesk 8.6. If you are using anything different you’ll need to adjust things in what I hope is a fairly obvious manner.

Firstly download the right Zend Optimizer package. Upload it to your server (Zend unhelpfully do not provide a direct download link) and unpack the tar ball.

Now find the right version for your version of PHP in the ‘data’ folder, for PHP 5.1 it’s in ‘5_1_x_comp’ inside will be a ‘’ this is the PHP module you will need to install, rename it to ‘’ then we will know which PHP version it’s for (Zend if you are reading this please try to follow some simple accepted standards with your naming).

In this environment PHP loads modules from ‘/usr/lib/php’ create a sub folder called ‘zend’ and copy the module into it.

Now create a file called ‘zend.ini’ in ‘/etc/php.d’ the file needs to contain the instruction to load the module ‘zend_extension=/usr/lib/php/zend/’.

Check things are ok with ‘php -v’ at the command line, if all is well you’ll get

PHP 5.1.6 (cli) (built: Mar 31 2010 02:44:37)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies

Now restart Apache and check the Zend Optimizer module is loaded with a simple phpinfo() script and make sure that your PHP scripts and so on are all still working.

You should have now successfully installed Zend Optimizer.


Google android on the HTC HD2

23 08 2010

I’ve been using the excellent HTC HD2 for quite a while now and its proven
to be a first class smart phone, with one black mark against it, it runs
Windows Mobile.

winmo, as it has become known has been around for years and has been a truly
awful operating system in its exposed form, its true value has been when
used on embedded systems which have hidden it from view and review.

With the arrival of iphone, android and even when compared to nokia symbian
or even blackberry its the outright loser by a long way. So it was quite a
surprise when HTC launched the HD2 and hobbled it out of the gate.

The HD2 hardware is leading edge and the screen is still one of the largest
on any smartphone. Which makes it even more bizarre to see the disappointing
Windows boot screen when you power it on.

To be fair to HTC they did an amazing job layering a very bespoke front end
on to of the awful Windows UI, Sense was lipstick on the pig. It was very
good lipstick but it was still a pig underneath.

As HTC continued to launch new phones, mostly running android the inevitable
calls for an upgrade from winmo to android started to be heard, HTC actually
said they could do it, then cruelly didn’t!

Rumors started to spread of a band of developers working on porting android to
the HD2, XDA soon had posts with devs making progress and soon after there
were videos showing work in progress android running on HD2 hardware.

I was watching carefully, but I use my phone everyday and couldn’t afford for it to
be sacrificed to a partially working android or worse a complete bricking.

Then in the last few days it looked like they had cracked it, android was
working. I downloaded the latest version, upgraded the phones radio and
carefully followed the simple instructions.

There it was, android. I did a lot of testing then started to select the
applications I would need. Everything was working, I decided to trial it for
reliability and stability for a week.

Here we are on day three and I can’t see what could happen now to make me
want to go back to winmo.

It feels like I have a new phone, probably the phone the HD2 should have
always been.

Hats off to the devs at XDA.