# Manage PHP Extensions

# Default PHP Extensions

The following PHP modules are installed on Enhance by default:

  • Redis (PHP 7.0 and above)
  • Curl
  • GD
  • FreeType
  • XPM
  • Zip
  • Opcache
  • Mhash
  • FTP
  • Mbstring
  • Sodium
  • PDO Sqlite
  • PDO MySQL
  • OpenSSL
  • Zlib
  • Exif
  • Tidy
  • XSL
  • BcMath
  • XML RPC
  • IMAP
  • GMP
  • Intl (PHP 7.1 and above)
  • Webp (PHP 7.4 and above)
  • Imagick
  • Mailparse (PHP 7.4 and above)
  • PCNTL
  • Sockets
  • LDAP

# Compile custom PHP extensions

It is possible to extend the supported modules using PECL (PHP Extension Community Library), PIE or by manually building the extension and copying to the global extension directory for your chosen PHP version.

Once a custom PHP extension has been added to Enhance, the extension will be available in the "PHP extension manager" for all new and existing customers to optionally enable.

To find the correct extension directory for your chosen version of PHP, run (as root):

/opt/ecp-php84/bin/php -i | awk -F'=> ' '/^extension_dir =>/ {print $2; exit}' | awk '{print $1}'
  • Replace php83 with your chosen version of PHP.

To build and install an extension with PECL:

On the server which hosts the website which you would like to add the module to, run:

apt update
apt install make gcc g++ autoconf
/opt/ecp-php83/bin/pecl install nameofmodule
  • Replace php83 with the version of PHP you are using
  • Replace nameofmodule with the module you would like to install

TIP

Your extension may require system libraries which are not yet installed. If you receive an error at compile time, you can usually install the missing libraries with apt-get.