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:
- Edit the PHP Selector Configuration File
- Open the following file for editing:
/etc/cl.selector/php.conf
- 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.
- Open the following file for editing:
- 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