ZendHQ Z-Ray Plugins Installation

ZendHQ Z-Ray supports a variety of plugins. Installation packages are distributed from common ZendPHP public repositories in https://repos.zend.com/zendphp/.

You install, enable, and disable ZendHQ plugins in your ZendPHP installation. By default, all plugins are disabled and you enable the ones you need.

How to install plugins in Linux and IBM i

There's no need to set up any extra repositories in Linux distributions or IBM i when you already have configured ZendPHP repositories for your ZendPHP installation.

Installation

To install the zendhq-plugins package, run one of the following commands:

rpm packages for Enterprise Linux (and compatible) and IBM i:

yum install zendhq-plugins

deb packages for Debian and Ubuntu Linux distributions:

apt install zendhq-plugins

apk packages for Alpine Linux:

apk add zendhq-plugins

Activation

The downloaded plugin files are located in the /opt/zend/zendphp/plugins/available directory.

The ZendHQ PHP extension looks for the files and directories in the /opt/zend/zendphp/plugins/enabled directory. To activate a plugin for the PHP extension, create symbolic links in the enabled directory that point to sub-directories in the available directory.

sudo ln -s ../available/<plugin> /opt/zend/zendphp/plugins/enabled

For example, to activate the Wordpress plugin:

sudo ln -s ../available/wordpress /opt/zend/zendphp/plugins/enabled

Deactivation

To deactivate a plugin, remove its symbolic link from the enabled directory.

sudo rm /opt/zend/zendphp/plugins/enabled/<plugin_name>

How to install plugins in Windows

There are two ways to install ZendHQ for Windows, the MSI Installer and the ZIP package. Both support the same activation methods.

Installation

Using the MSI installer

The MSI installer already includes all ZendHQ plugins. The files are installed in the ZendPHP installation directory when you select the php_zendhq feature for installation.

The files are located in the C:\Program Files\Zend\ZendPHP\plugins directory

  • The sub-directory available contains the actual plugin files.

  • The sub-directory enabled is where the ZendHQ PHP extension searches, and from where it loads, the plugins that you have selected for use. By default, it is empty.

Using the ZIP package

You can also install plugins by downloading the plugin distribution ZIP file and extracting it into your ZendPHP installation directory. The ZIP file contains the plugins directory and the available sub-directory containing the plugin directories and files.

The ZendHQ PHP Extension configuration file contains the path of the activated plugins as zendhq.zray.plugin_dir parameter value. Ensure that it points to the correct location where the enabled (not the available) plugin files are located in your environment.

Activation

All plugins are disabled by default. To activate a plugin:

  • Either create a directory soft link to link a plugin directory under available to the sub-directory in enabled.

  • Or copy the plugin directory from the available to the enabled sub-directory

Activate only the plugins that you actually need. Do not activate all available plugins at the same time, because every additional loaded module affects system performance.

The examples below contain the installation path as it is by default with the MSI installer. If you have not installed ZendPHP using the MSI installer, use your custom directory name instead.

As an example, we use the Wordpress plugin. Replace Wordpress by the name of the plugin that you want to activate.

Soft links

To activate a plugin, create a soft link:

mklink /D "C:\Program Files\Zend\ZendPHP\plugins\enabled\wordpress" "..\available\wordpress"

Creating soft links may be restricted in your system settings. In this case, use the “Copy directory” method instead.

Copy directory

Use this option if your system restricts the creation of soft links.

xcopy "C:\Program Files\Zend\ZendPHP\plugins\available\wordpress" "C:\Program Files\Zend\ZendPHP\plugins\enabled\wordpress"

Deactivation

To deactivate a plugin, remove the plugin directory from the enabled sub-directory. This approach is valid for both the soft links and the copied directory solution.

rmdir "C:\Program Files\Zend\ZendPHP\plugins\enabled\wordpress"