First, let’s check if we are using PHP-FPM for a specific domain.
1) Login to WHM.
2) Navigate to MultiPHP Manager to check whether the domain is using PHP-FPM or not.
3) From that page, you can verify that the domain is using PHP-FPM.
Now you can either login to your server as root via SSH (putty or similar software) or you can just use the Terminal tab in WHM.
4) Check the PHP version of the server using the below command.
1
|
php - v |
5) Then open the PHP-FPM configuration file.
1
|
vi /opt/cpanel/ea-php72/root/etc/php-fpm .d /domain .tld.conf |
Replace domain.tld with the actual domain.
6) Then you will find the exec() function in the disabled function list.
1
|
php_admin_value[disable_functions] = passthru,shell_exec,system |
7) Remove that from the above line.
8) Then restart PHP-FPM using the below command.
1
|
/scripts/restartsrv_apache_php_fpm |
You can also restart the service from WHM.