- Plesk for Linux
How to install Zend Guard Loader on Plesk PHP?
Plesk does not provide Zend Guard Loader pre-installed, however, it can be installed manually.
Warning: the instruction below was not tested with Plesk and should be done at your own risk.
Note: it is required to replace opcache.co library included in Plesk PHP with the one supplied in Zend Guard Loader package. With every update, Plesk will overwrite the opcache.co library. Due to that, it is required to disable opcache module in Plesk.
Open Tools & Settings > PHP Settings > PHP 5.x.
Disable opcache extension.
Connect to the server via SSH.
Determine the system architecture:
# uname -m
Note: In case the output is
x86_64, 64-bit version of the extension should be downloaded in the next step, otherwise, 32-bit version
Download Zend Guard Loader according to the target PHP version and the system architecture from the official website: Zend Guard Loader Downloads.
Note: As the example, Plesk PHP 5.6 and x64 architecture will be used as target. In order to apply these commands to the other PHP version 56 should be changed to the corresponding version, for example, to 54 for PHP 5.4.
Upload the archive to the server and extract files from it:
# tar xf zend-loader-php5.6-linux-x86_64_update1.tar.gz
ZendGuardLoader.solibrary to the modules folder:
# cp ./zend-loader-php5.6-linux-x86_64/ZendGuardLoader.so /opt/plesk/php/5.6/lib*/php/modules
ZendGuardLoader.solibrary with a changed name to the modules folder:
# cp ./zend-loader-php5.6-linux-x86_64/opcache.so /opt/plesk/php/5.6/lib64/php/modules/ZENDopcache.so
# echo 'zend_extension=ZendGuardLoader.so' > /opt/plesk/php/5.6/etc/php.d/zendGuardLoader.ini
# echo 'zend_extension=ZENDopcache.so' > /opt/plesk/php/5.6/etc/php.d/ZENDopcache.ini
# service plesk-php56-fpm restart