# PHP Versions and Modules

# PHP Versions

Each website has control of its own PHP (opens new window) version. By default, 8.1 is configured on all new websites added to an Enhance cluster. Additional domains mapped to a website (add-on domains) use the same PHP version as the primary (root) domain.

The default PHP version and supported PHP versions can be configured on a per package basis.

Enhance currently supports the following PHP versions by default. More are being added.

  • PHP 8.5 (Imagick PECL module currently not available for 8.5, pending their release of a compatible module)
  • PHP 8.4
  • PHP 8.3
  • PHP 8.2
  • PHP 8.1 [default]
  • PHP 8.0
  • PHP 7.4
  • PHP 7.3
  • PHP 7.2
  • PHP 7.1
  • PHP 7.0
  • PHP 5.6

The following PHP versions are supported but require manual installation on your platform:

WARNING

PHP versions PHP 5.2, PHP 5.3, PHP 5.4 and PHP 5.5 are deprecated.

  • 5.5
  • 5.4
  • 5.3
  • 5.2

# Default PHP Modules

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 Module

It is possible to extend the supported modules using PECL (PHP Extension Community Library).

To add an additional module:

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-php81/bin/pecl install nameofmodule
  • Replace php81 with the version of PHP you are using
  • Replace nameofmodule with the module you would like to install

TIP

Your module 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.

On the website you would like to enable the module on visit developer tools and add a directive in the php.ini editor called “extension” with the value “nameofmodule”