Disable PHP disable_functions on Cpanel Server

On a Cpanel Server using CentOS 7 + php-fpm, site phpinfo() shows few functions are set to disabled in disable_functions.

PHP disable_functions

I checked server wide PHP configuration in WHM for the PHP version the site is using. There is no disable_functions specified.

WHM > Software > MultiPHP INI Editor > Editor Mode > PHP 7.3

WHM php.ini editor

This is because in Cpanel server running in PHP-FPM, you need to edit php-fpm pool config file at

vi /opt/cpanel/ea-php73/root/etc/php-fpm.d/DOMAIN_NAME.conf

Replace ea-php73 with whatever PHP version you selected for this web site.

Remove the line

php_admin_value[disable_functions] = exec,passthru,shell_exec,system

Restart php-fpm with

/scripts/restartsrv_apache_php_fpm

See Cpanel Server

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *