Can I use scripts that require Zend Guard (Zend Optimizer)?
These scripts aren't like normal PHP scripts. In particular, it isn't possible to look at them and see how they work. Some software authors encode their scripts this way to prevent people from copying the script "code".
These kinds of scripts require a special, nonstandard piece of software (also called "Zend Guard") to be installed on the server. Our servers have Zend Guard available for PHP, and you can enable it for your account so you can use encoded PHP scripts.
(If you try using an encoded script without enabling Zend Guard, you'll see a message saying "Zend Guard not installed". Enabling Zend Guard for your account will fix this.)
On this page:
- Limitations of Zend Guard
- Enabling Zend Guard for PHP scripts on your account
- Uploading Zend Guard files using FTP
- “Incompatible file format” errors with Zend Guard
Limitations of Zend Guard
Before you enable Zend Guard, we should explain these things:
- Unlike almost all the other software we install on our servers, Zend Guard is not "open source". That means that nobody (including us) can view how it works, making it difficult to tell what's wrong if it doesn't work. If you have trouble with PHP scripts after enabling it, we probably won't be able to help you figure out the cause of the problem, unfortunately; we'll only be able to suggest turning off Zend Guard.
- Similarly, when you install an encoded PHP script that requires Zend Guard, we won't be able to see how that script is supposed to work, either. If you have trouble, your only option would be to contact the company that sold you the script.
- When PHP is updated, your existing Zend Guard encoded scripts probably will not work unless they are re-encoded by the script author for a different PHP version. If the author of a script is no longer creating new versions, there will be no way to make it ever work again.
- Finally, by using these kinds of scripts, you're tying yourself to the company that makes Zend Guard. Your script will only work as long as that company continues to create versions of Zend Guard that work with new versions of PHP.
In short, encoded scripts will probably stop working occasionally unless you can get a new version from the author, and if they have problems, it may be more difficult for you to get help with those problems. You should not use these scripts if you care about the reliability of your site. We (Tiger Technologies) don’t use such scripts on our own web site under any circumstances, no matter how useful they are.
However, we do recognize that sometimes there is no alternative to a particular script, and we provide a copy of Zend Guard on our servers for such situations.
Enabling Zend Guard for PHP scripts on your account
You can enable Zend Guard in your account management control panel:
- Login to the control panel
- Click PHP Settings
- Check the Enable Zend Guard box
- Click Save Settings
Uploading Zend Guard files using FTP
Unlike normal PHP files, Zend Guard-encoded files need to be uploaded with your FTP program set to “binary” mode, not “ASCII” or “text” mode. You may need to manually override your FTP program’s settings while uploading to do this. The instructions for your FTP program should explain how to change the mode.
“Incompatible file format” errors with Zend Guard
If you use a Zend Guard-encoded file that the author created for one PHP version, and then we switch to another PHP version, the files will stop working and a message like this will appear in your error log:
Incompatible file format: The encoded file has format major ID 3, whereas the Loader expects 4
If this happens, you’ll need to obtain a newly-encoded version of the script from the author. There’s no other way to solve it.