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.
I checked server wide PHP configuration in WHM for the PHP version the site is using. There is no disable_functions specified.
1 |
WHM > Software > MultiPHP INI Editor > Editor Mode > PHP 7.3 |
This is because in Cpanel server running in PHP-FPM, you need to edit php-fpm pool config file at
1 |
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
1 |
php_admin_value[disable_functions] = exec,passthru,shell_exec,system |
Restart php-fpm with
1 |
/scripts/restartsrv_apache_php_fpm |
See Cpanel Server