Installing ZendGuard Loader

Installing ZendGuard Loader

Zend Guard is the most widely accepted PHP encoding and obfuscation product on the market which protects your application from unlicensed use and reverse engineering.

Enabling SSH/Shell access

The easiest way to install Zend Guard is via SSH/Shell.

View the following articles to create a Shell user and log into your server via SSH:

Download and install for PHP 5.6

  1. Download the Loader Module at the following page:
    In this example, the file used is 'Zend Guard Loader for PHP 5.6 - 64 bit' titled 'zend-loader-php5.6-linux-x86_64.tar.gz.
  2. Upload the .tar.gz file via FTP to your web server. Make sure to upload it to your user's directory.
  3. Log into your web server via SSH.
  4. Decompress the file by running the following:
    [server]$ tar -zxvf zend-loader-php5.6-linux-x86_64.tar.gz
    This creates a folder named /zend-loader-php5.6-linux-x86_64 with the 'ZendGuardLoader.so' file in it
  5. Use the following instructions to create /.php/5.6/ directories under your user:
    /home/username/.php/5.6/
    • Make sure to add the correct folder name for your version of PHP.
    • The username is your actual shell username.
    • This example uses PHP 5.6, so you’d create the /.php/ folder followed by the /5.6/ folder.
    • Don’t worry about creating the phprc file at this time.
  6. Navigate into the decompressed directory from step #2:
    [server]$ cd ~/zend-loader-php5.6-linux-x86_64
  7. Copy the .so file to your /.php/5.6/ directory:
    [server]$ cp -p ZendGuardLoader.so ~/.php/5.6/
    • The extension is placed in the associated PHP version folder.

Configure the phprc file

  1. Navigate back to the /.php/5.6/ directory:
    [server]$ cd ~/.php/5.6/
  2. Inside the /.php/5.6/ folder, create a new text file named 'phprc' via SSH/Shell:
    [server]$ nano phprc
  3. Add the following contents:
    zend_optimizer.optimization_level=15
    zend_extension=/home/username/.php/5.6/ZendGuardLoader.so
  4. When finished, press CTRL + O on your keyboard.
    • You are prompted to save the file.
  5. Click the Enter button to save.
  6. Finally, click Ctrl  + X to exit 'nano' and return to your shell.
  7. Once you finish, restart PHP by running this command:
    [server]$ killall php56.cgi

Verifying the setup

Once Zend Guard Loader is properly installed, you should see it in your PHP info file:

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
    with Zend Guard Loader v3.3, Copyright (c) 1998-2014, by Zend Technologies

See also

Did this article answer your questions?

Article last updated .