Does Joomla Require Zend Optimizer to Run?

One of our clients who wanted to switch to another hosting provider called us this morning and asked us whether Joomla requires the Zend Optimizer to run. Our immediate answer was “Do you mean Zend Optimizer? Or Zend Guard?”. He thought for a moment and answered that he’s not sure…

We answered that he most likely meant Zend Guard (which is often confused with Zend Optimizer), which is a server tool that allows software companies to sell their PHP based applications without giving away the code. OK – we know – it sounds a bit vague, so let us explain to you how this works…

Let’s say you purchased a 3rd party extension that requires Zend Guard to work. Now, typically, when you install a regular extension (e.g. an extension that doesn’t require any tool to run) in Joomla, the files of that extension will be extracted to their appropriate places (as specified by the XML manifest file), the #__assets and #__extensions tables in the database will be properly updated, and the extension will be ready for use. Any request to use that extension follows the process below:

  • Apache checks the request and notices that the request consists of processing PHP files so it passes the request (and all the information associated with it) to the PHP parser.
  • The PHP parser reads the necessary PHP files (e.g. the core Joomla files and the PHP files associated with your extension) and verifies there are no parse errors with them.

  • The PHP parser interprets the files and ultimately creates an output.

  • PHP passes the output to Apache.

  • Apache sends the output to the browser.

  • The browser displays the output.

Now, the above is what happens for normal extensions; extensions that don’t need any 3rd party tools to run. So, what is the process for, let’s say, the extension that you just purchased (that requires Zend Guard to run)? Well, here it is:

  • The browser sends the request to the web server.
  • Apache checks the request and notices that it is using some PHP files that are encoded with Zend Guard, to which the request is passed. (Note that since the files are encoded, PHP will not be able to read them).

  • Zend Guard decodes the encoded PHP code in the files and passes the request to PHP.

  • PHP is now able to read the decoded files. It checks them for any parse errors and if there are none, it generates the appropriate output and passes it to Apache.

  • Apache pushes the output to the browser and the latter displays the page.

If you think that the latter method creates an overhead on the server, then you’re right. If you have a very large website, then stay clear of these encoded extensions because they throw some considerable (and unnecessary) load on the server when they are decoded by Zend Guard (or any other PHP encoder/decoder, for that matter).

Now – here’s a small FAQ on the subject:

Are there other tools to encode/decode PHP code that a Joomla administrator need to know about?

Yes – in fact the most used PHP encoded/decoder is not Zen Guard, but it’s called ionCube PHP Encoder. Both have more or less the same performance, but the latter is definitely the standard.

Is it hard to find a hosting company that offers Zend Guard?

No – it is actually very easy. Most hosting companies have Zend Guard (for mysterious reasons hosting companies refer to it as Zend Optimizer) and ionCube PHP Encoder installed on their VPS and dedicated server plans.

Does one need to pay monthly/usage fees for Zend Guard and other PHP encoders?

No – usually the fees are included in the hosting price. We haven’t seen a single company charging additional fees for PHP encoders.

Are there privacy issues associated with Zend Guard and other PHP encoders?

No – what happens on your server stays on your server. Zend Guard and ionCube PHP Encoder do not send any information home. So you can use them with no issues. However, this does not guarantee that the encoded application does not send information to its home. The best way to make sure this is not the case is to monitor the traffic on your server for any weird connections once you use that application.

Are there any disadvantages associated with using a PHP encoder such as Zend Guard?

Well, besides the slower performance and the higher load, the main issue that the a PHP encoded application is technically a black box, which means that neither you nor the best programmer in the world is able to know how the code works. Additionally, such applications are nearly impossible to extend.

Is Joomla fully compatible with PHP encoders?

Joomla does not communicate directly with any encoded PHP code. All the PHP code that Joomla deals with is decoded (by the PHP decoder) prior to any interaction, which means compatibility is a non-issue.

So does Joomla require Zend Guard to run or not?

We know, we have not technically answered the question in the title yet (although the answer is obvious). So, let’s do this right now: Joomla, whether it’s version 1.5, 2.5, or 3.x, does not require anything other than a basic LAMP (Linux, Apache, MySQL, and PHP) environment (check Joomla’s ideal environment here) to work properly. In short, a basic instance of Joomla with no 3rd party extensions can run perfectly well without Zend Guard. If the Joomla website has an extension that requires Zend Guard, then the latter becomes a requirement for the whole website, which means that the server hosting the Joomla site must have the Zend Guard installed.

What if I want help with working with a PHP encoder on a Joomla website?

Well, then you’ve come to the right place. Just contact us and we will instantly jump to help (figuratively speaking) – keep in mind that our very affordable fees apply.

No comments yet.

Leave a comment