Provides a single line of code to clean up duplicate PHP extensions, removing the "PHP Warning: Module 'any_extension' already loaded" errors from your servers. Works on Ubuntu, Debian, CentOS, AlmaLinux, Rocky Linux, Oracle Linux, and servers running cPanel/WHM.
Run as root or user with sudo privileges:
sudo wget https://phpcleanup.radnoc.com -O php-extension-cleanup.sh && bash php-extension-cleanup.sh
For Dry Run (only report extension duplicates and make no changes):
sudo wget https://phpcleanup.radnoc.com -O php-extension-cleanup.sh && bash php-extension-cleanup.sh --dry
less /var/log/php_extension_cleanup.log # view log output of dry run