We will go over how to enable PHP-FPM exec() in this post. Sometimes after enabling PHP-FPM, the exec() function stops functioning, and we cannot locate any disabled functions in the PHP settings. After turning off PHP-FPM, we can execute it once more.

In case you run across this problem, kindly take the following actions:

First, confirm that PHP-FPM is authorized on the domain where the problem is occurring. For that, follow these steps:

  1. Log in to WHM with your credentials.
  2. Access to MultiPHP Manager to see if your domain makes use of PHP-FPM.
  3. There, you can check to see if the domain is using PHP-FPM.

After this, follow these steps to make PHP-exec() FPMs available:

  1. Access the server via SSH.
  2. To check the server’s PHP version, run the command below

    #php -v

  3. You can open the PHP-FPM configuration file

    # vi /opt/cpanel/ea-php70/root/etc/php-fpm.d/blah.domain.tld.conf

  4. The exec() function can be found in the list of disabled functions.

    php_admin_value[disable_functions] = passthru,shell_exec,system

  5. Take off the word “exec” from the top line.
  6. The next command should be used to restart PHP-FPM.

    # /scripts/restartsrv_apache_php_fpmAnd that is how you can enable exec() in PHP-FPM.

Please feel free to get in touch with our support staff if you need any additional help with web hosting

Popular Posts You May Read

Explore more hosting insights, tips and industry updates.

How to Fix the Magento 503 Temporarily Unavailable Error

When your server is functioning properly but is now unable to manage a request, it…

Creating An Add-on Domain In cPanel

If you want to create an Add- domain in your cPanel then you have to…

How can you change the server time in WHM

How can you Change the Server Time in WHM?

We will explain in this article In WHM, how do you change the server time.…