PhpSwitcher - Zend Guard Loader

  • Hey,

    I'd like to install / use Zend Guard 7 for PHP 5.6. I'm already using PHPswitcher to switch between different PHP Versions.

    How can I install this extension? Is it possible to user the script?

    Thank you.

    Kind Regards,

  • Hello,

    Zend Guard is a PHP extension.

    Is it possible to user the script?

    No. the PHP compiler allows to compile various PHP versions only.

    In order you must:

    • Download the Zend Guard loader matching the PHP version for which you want enable it at t
    • For the rest, instructions are identical to those given for the IonCube loader, excepted that you must adapt the paths and module name. See here:…hpswitcher#ioncube_loader

    If you don't figure out alone, I'll create a howto this evening.


  • You need it for which PHP version exactly? All?


  • Yes, they are... I'll post the howto this evening.


  • @mazzo

    Sorry, I forgotten you. Here comes the howto for PHP 5.6 (compiled with the PHP comiler that is provided by the PhpSwitcher plugin).

    1. Compile your PHP 5.6 version by using the PHP compiler that is provided by the PhpSwitcher plugin
    2. Download the Zend Guard Loader archive for Linux under the/usr/local/src directory (For my test, I choosen Zend Guard Loader for PHP 5.6 - Linux 64bits)
    3. Copy both, the and the modules from the Zend Guard Loader archive directory into the PHP extension directory as follow:

    1. # PHP_EXT_DIR=$(/opt/phpswitcher/php5.6/bin/php-config --extension-dir)# cd <zend_guard_archive_dir># cp $PHP_EXT_DIR/# cp $PHP_EXT_DIR/

    4. Create the required PHP ini file for activation of the Zend Guard Loader

    1. # echo "zend_extension = $PHP_EXT_DIR/" > /opt/phpswitcher/php5.6/etc/php/conf.d/01_ZendGuardLoader.ini

    5. Make sure that both, OPcache and ZendGuard Loader are correctly installed:

    1. # /opt/phpswitcher/php5.6/bin/php -v

    Expected output

    1. PHP 5.6.27 (cli) (built: Nov 9 2016 14:26:32)
    2. Copyright (c) 1997-2016 The PHP Group
    3. Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    4. with Zend Guard Loader v3.3, Copyright (c) 1998-2014, by Zend Technologies
    5. with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend Technologies

    6. Depending on the i-MSCP httpd server implementation you're using, restart Apache2 or the psw5.6-fpm service. Note that the PHP version must be first registered through the PhpSwitcher interface (admin level)

    You're done.

    For the rest, read the README.txt file inside the Zend Guard Loader archive.