Installing Zend Guard on Linux distributions (Centos 6, Debian, Ubuntu)

Zend Optimizer is a PHP extension and can be used to run PHP scripts that are encoded with Zend Guard. Zend Optimizer is compatible with PHP 5.2. If you are running PHP 5.3 or above you should use Zend Guard, which is an analogue of Zend Optimizer. In this article I will go through the steps you need to follow when installing Zend Guard on popular Linux distributions like Centos 6, Debian, Ubuntu.

1. First you need to know the linux distribution, it’s architecture, and the PHP version you are using.

  • To find the linux distribution, type cat /etc/issue in terminal.
  • To find the architecture of your system, type uname -a in terminal.
  • To find the php version, type php -v in terminal.

2. Download the appropriate Zend Gard

  • For 32-bit operating systems :
  •  For 64-bit operating systems :

3. Un-tar the downloaded archive

4. Move to an appropriate location

5. Specify zend_extension in the php.ini file

6.  Restart the web-server

  • In Debian / Ubunu
  •  In Centos

7. Check whether the module loads properly

8. Done 🙂

  • Arif


    thanks you very much. It works fine for me here.



  • How can i install zend loader command?
    tell me the yum command

    • Hello,
      The procedure is same for most of the Llinux distros (Centos 6, Debian, Ubuntu, Redhat). You just have to download the tar.gz file, extract it to the appropriate location and point that file in php.ini file.

  • Nathan Crause

    Zend Guard 64-bit causes a segmentation fault on Ubuntu 12.04 LTS rendering it unusable.

  • testing

    Failed loading /usr/lib/php5/ /usr/lib/php5/ wrong ELF class: ELFCLASS64

    • This Failed loading message means that you have the wrong module version and to fix that you simply
      have to copy/replace the existing one with the proper version file.

      • testing

        i am using ubuntu 64 bit machine hence downloaded 64 bit .so file was anything wrong ? pls guide

        • Even though you have a 64bit machine, the Apache version you have installed on your machine might be 32bit. To find out which version of Apache you are using, open your terminal and type “apache2 -V”. Then It will give you several info on your installed Apache. There you will find the “Architecture”. The “” you should install must be compatible with that “Architecture” (32bit or 64bit).