Theme editor

Guide cPanel How to Configure disable_functions in cPanel (Guide 2025)

  • Thread starter Thread starter CL4Y
  • Start date Start date
  • Views 128

CL4Y

Keyboard Ninja
Administrator
Thread owner

📝 How to Configure disable_functions in cPanel

To enhance your website’s security, it may be necessary to disable certain PHP functions in the configuration.
This process can be easily done through cPanel. In this guide, we’ll walk you step-by-step through how to edit the disable_functions setting using the cPanel/WHM panel.

🔒 What Is disable_functions?

disable_functions is a directive in the PHP configuration file (php.ini).
It allows you to disable specific PHP functions that could pose security risks.
For example, functions such as exec, shell_exec, and passthru can be used to execute system commands, which makes them potential targets for malicious activity.



🔧 Step-by-Step: Configuring disable_functions in WHM Panel

  1. Log in to WHM Panel
  2. Go to “MultiPHP INI Editor”
    Use the search bar on the left menu and type MultiPHP INI Editor to open the relevant page.
  3. Select the “Editor Mode” Tab
    From here, choose the PHP version you want to edit (e.g., PHP 8.2).
  4. Find the disable_functions Line
    You should see a line similar to the example below:

Bash:
disable_functions = "exec,passthru,shell_exec,system,proc_open,popen"

You can update this line based on your security needs.
For example, to disable only the exec and system functions, use:
Bash:
disable_functions = "exec,system"

jetto-cpanel-disable_functions-settings-1.gif


⚠️ Important Notes

  • Be cautious when disabling functions, as some PHP applications and plugins may rely on them to function properly.
    Only disable functions you’re certain are not required by your system.
  • To verify that your changes are working, you can create a simple PHP file that displays current configuration values using phpinfo().
 
Thread owner
The disable_functions setting is an effective method for enhancing your server's security. However, you should be careful when configuring this setting and only disable functions that are not necessary. You can easily complete this process in a few steps using WHM/cPanel.
 
Back
Top