You can install any PHP module which exists in PECL by building it with the pecl binary. The path will be /opt/ecp-phpXX/bin/pecl
where phpXX denotes the PHP version, for example PHP 8.1 would be /opt/ecp-php81/bin/pecl
. The module will be placed in the default extension dir for your chosen PHP version and can be added either to the global php.ini or per-website php.ini using the extension
directive.
The only caveat is that, right now, only one custom extension can be loaded at a time since the php.ini editor will only allow a single extension
directive. This has changed in 12.1.0
and you will be able to allow your customers to select from your custom-built extensions in the same way they do from the extensions we provide, using the toggle system under "developer tools".