How to Enable or Disable Functions Customisation for Users in PHP Selector

June 2, 2025 / Web Design & Development

By default, some PHP directives, such as “disable_functions,” may not be available for user-level management through PHP Selector. This article explains how to enable the disable_functions directive, allowing users to control it from their hosting control panel. This can help customise PHP behaviour or tighten security based on individual needs.

Solution:

  1. Edit the PHP Selector Configuration File
    1. Open the following file for editing:
      /etc/cl.selector/php.conf
    2. Add the following lines to let the user control the disable_functions directive:
      Directive = disable_functions
      Type = value 
      Comment = This directive allows you to disable certain functions 
      for security reasons. It takes on a comma-delimited list of 
      function names. disable_functions is not affected by Safe Mode.
  2. Update CageFS Configuration
    After editing the configuration file, apply the changes with the following command:

    cagefsctl --force-update

Cause:
The disable_functions directive is not included by default in the PHP Selector configuration. Adding it manually allows end users to modify this setting via their control panel (e.g., cPanel with CloudLinux integration).

Following the steps above, you can enable user-level control over the disable_functions directive through PHP Selector, enhancing flexibility and control over PHP settings. Make sure to run the cagefsctl update command to apply the changes system-wide.

Want to expand user control beyond PHP? Learn How to Install Node.js Selector on CloudLinux

Spread the love