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 php_compiler.pl script?


    Thank you.


    Kind Regards,
    mazzo

  • Hello,


    Zend Guard is a PHP extension.

    Is it possible to user the php_compiler.pl 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 thttp://www.zend.com/en/products/loader/downloads
    • 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: https://wiki.i-mscp.net/doku.p…hpswitcher#ioncube_loader

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

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

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

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

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

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • @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 opcache.so and the ZendGardLoader.so modules from the Zend Guard Loader archive directory into the PHP extension directory as follow:

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

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

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

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

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

    Expected output

    Shell-Script
    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.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206