Question
How to add additional PHP module for PHP engines shipped with Plesk on Linux?
Answer
Note: The resolution steps described in this article require administrative permissions and SSH access to the server with Plesk installed. Contact the server administrator if necessary.
Note: if you are interested in installing Memcached or Memcache modules, see the following article: How to install/uninstall memcached or memcache extension for PHP on Plesk server?
Starting from Plesk 12.0 it is possible to have multiple PHP versions out of the box. Additional PHP versions can be easily installed via Plesk Installer. The installation path is /opt/plesk/php/
:
# ls -l /opt/plesk/php/
total 16
drwxr-xr-x 8 root root 4096 Jun 6 14:52 5.6
drwxr-xr-x 8 root root 4096 Jun 6 14:52 7.0
drwxr-xr-x 8 root root 4096 Jun 6 14:51 7.1
drwxr-xr-x 8 root root 4096 Jun 6 14:51 7.2
PHP versions shipped with Plesk already has a pre-defined set of modules that commonly used.
Click here to see how to find the list of installed and enabled PHP modules, e.g. for PHP 7.0
# /opt/plesk/php/7.0/bin/php -m
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
enchant
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
imagick
imap
intl
ionCube Loader
json
ldap
libxml
mbstring
mcrypt
mysqli
mysqlnd
odbc
openssl
pcntl
pcre
PDO
pdo_mysql
PDO_ODBC
pdo_pgsql
pdo_sqlite
pgsql
Phar
posix
pspell
readline
redis
Reflection
session
SimpleXML
soap
sockets
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
xsl
Zend OPcache
zip
zlib
[Zend Modules]
Zend OPcache
the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured)
However, sometimes to match system requirements for particular PHP applications it is necessary to install and enable additional PHP module that is not in the list. The steps below explain how to do that.
Note: Installing of the additional PHP modules is a part of the server maintenance duty and should be performed by the Plesk server's administrato…