PECL extensions are third-party extensions for PHP. These extensions often add new built-in functions to PHP that do not exist in the core PHP language. PECL extensions are often used to provide a way for PHP code to interact with additional system libraries.
PECL extensions need to be recompiled if libraries used by the extension have changed in a way that is not backwards compatible.
The only time your server's libraries will undergo a backwards incompatible change is when you upgrade Ubuntu to a new major version (for example, Ubuntu 22.04 to 24.04). In contrast, daily automatic updates do not include breaking changes and do not require you to recompile PECL extensions.
To list the installed PECL extensions for a particular PHP version, SSH into your server and run the following command.
peclX.Y list
For example, to list installed PECL extensions for PHP 8.4, use this command:
pecl8.4 list
If the output of the command is "(no packages installed from channel pecl.php.net)", then there are no PECL extensions installed for that PHP version.
To find all PECL extensions installed on your server, repeat the peclX.Y list command for each PHP version on your server.
Recompiling a PECL extension involves three steps:
You do not need to add or remove the PECL extension's PHP configuration. You should ignore all messages about php.ini when recompiling PECL extensions.
To recompile a PECL extension for a particular PHP version, SSH into your server and run the following commands.
peclX.Y-sp uninstall EXTENSION peclX.Y-sp install EXTENSION service phpX.Y-fpm-sp restart
PECL extensions may ask configuration questions during the installation. When promoted with configuration questions, you can accept the suggested default by pressing ENTER.
If you encounter problems re-installing an extension, check our documentation for information about that extension or contact support.