how to host legacy websites that need zend optimizer

have you found that you can’t host your old website that was encoded in the Zend Optimizer due to that software not working with modern PHP?  well i have multiple times and this document aims to be a quick overview on the problem and what you can do about it.

the background
Zend Optimizer is a runtime program installed into PHP servers so that they can decode software that was encoded in Zend’s security obfuscation tools.  if you don’t have Zend Optimizer installed for any file in a website that was encoded with their development software it won’t run, its that simple.

the problem is that the software used to decode files was changed significantly after the release of the 3.x series of Zend Optimizer.  the product was in fact discontinued as the next version of the software was called Zend Guard instead of Optimizer.   the changes in Zend Guard mean that the runtime version of the software used for decoding can’t decode software encoded in old versions of the development software.  in other words, anything that Zend Optimizer could decode won’t decode in Zend Guard.   

now that is a problem for some web developers as it means distributing multiple versions of codebase.  however the huge problem that is affecting many more people is that Zend Optimizer doesn’t work on any recent versions of PHP!  

this means that when you come to upgrade or change web server you will most likely find that the new server is running a more recent version of PHP that you can’t install Zend Optimizer onto.   at the time of writing most servers are coming installed with PHP v5.3 to 5.5.  

if you’ve spent a lot of time investing in an application that needs the Zend Optimizer, especially if it’s one that you purchased and can’t recompile yourself you are in a real predicament.   this is what happened to me with various clients that had old installations of the Viart ecommerce solution.  versions of this php software before v4 were all encoded in the Zend Optimizer and i’ve recently had to migrate a few of these customers solutions to new servers and had exactly this problem.

the solution
assuming your set on trying to save your Zend Optimizer website and are not going to replace your whole site then don’t worry, it can be done and it doesn’t need to be too expensive.  the key to this is hosting the website on a VPS webserver.  

once your on a VPS you can install whatever software you want including different versions of PHP.  you can even install multiple versions of PHP and have different websites and domains running the different versions as you so require.  this means that if you pay for VPS hosting and have say 3 domains, if one of them needs Zend Optimizer then it can be handled by PHP 5.2 whist the remaining two can be processed by the default PHP installation that is of a newer revision.

i have even successfully made such installations on heavily modified windows and linux servers that come with easy to use control panel interfaces such as Plesk (that try to remove the need for you to get too involved in the workings of the server).  

in such cases re-compiling the PHP server software in a custom build on the server and then adding profiles into the Plesk interface allowed users to select different PHP versions for different domains in their VPS (shown in the screenshot below from a Plesk 11.5 Linux server).

Screenshot from a Linux Plesk 11.5 server settings and the new custom PHP option post my manual installation

if you need help with such a solution and are considering migrating an old Zend Optimizer site or need to run different versions of PHP for any other reason on your server just get in touch with me.