How to configure ZendGuard in CentOS/RHEL

Running Zend Guard on your PHP scripts will help encode your scripts to prevent reverse engineering and unauthorized edits to your code, it will likewise shield your code from unapproved utilization, and you can run Zend Guard encoded scripts through Zend Optimizer (with PHP 5.2 and more established) to help upgrade the execution of your PHP applications too.

zend-guard-logo-343x72px

Zend Guard expands programming productivity by:

  • Restricting unapproved duplication or utilization of your applications.
  • Guaranteeing that just authorized clients utilize your products and that they stay inside the terms of your license.
  • Offering adaptable authorizing terms that make your product items more alluring, expand deals, and enhance consumer loyalty.
  • Expanding change rate from assessment to authorized item.
  • Keeping other individuals from changing your code ensuring the documents against outside altering.
  • Step 1: First we need to check the version of php. Use following command to check the version

    php -v
    

    php

    Step 2: Now you will download Zend Guard package according to PHP installed on server.

    You can also download ZendGuard from Zend website.

    # cd /opt
    For 64-bit (PHP 5.4):
    # wget http://downloads.zend.com/guard/6.0.0/ZendGuardLoader-70429-PHP-5.4-linux-glibc23-x86_64.tar.gz
    For 32-bit (PHP 5.4):
    #wget http://downloads.zend.com/guard/6.0.0/ZendGuardLoader-70429-PHP-5.4-linux-glibc23-i386.tar.gz
    For 64-bit (PHP 5.3):
    # wget http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz
    For 32-bit (PHP 5.3):
    # wget http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz
    

    Step 3: Now extract the archive using tar command and access the ZendGuard folder:

    # tar xzvf ZendGuardLoader-70429-PHP-5.4-linux-glibc23-x86_64.tar.gz
    # cd ZendGuardLoader-70429-PHP-5.4-linux-glibc23-x86_64
    

    Step 4: After accessing the ZendGuard folder copy ZendGuardLoader.so file to modules directory:

    For 32-bit:
    /usr/lib/php/modules
    
    For 64-bit:
    /usr/lib64/php/modules
    
    # cp /opt/ZendGuardLoader-70429-PHP-5.4-linux-glibc23-x86_64/php-5.4.x/ZendGuardLoader.so /usr/lib64/php/modules
    

    Step 5: Now add following lines inside that php.ini file or you can also create new file ZendGuard.ini inside /etc/php.d directory:

    # vim /etc/php.d/ZendGuard.ini
    For 32-bit:
    ; Enable Zend Guard extension
    zend_extension=/usr/lib/php/modules/ZendGuardLoader.so
    zend_loader.enable=1
    
    For 64-bit:
    ; Enable Zend Guard extension
    zend_extension=/usr/lib64/php/modules/ZendGuardLoader.so
    zend_loader.enable=1
    

    Step 6: Now you can restart Apache service:

    # service httpd restart
    

    Step 7: Check using the following command that ZendGuard extension is configured or not

    # php -v
    

    Zend_Loader_1

    No Responses

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

    The reCAPTCHA verification period has expired. Please reload the page.