When safe_mode is on, only executables located in the safe_mode_exec_dir will be allowed to be executed via the exec family of functions.

Example :

safe_mode_exec_dir = "/usr/local/bin"

When safe mode is enabled, the safe_mode_exec_dir parameter restricts execution of executables via the exec() function to the assigned directory. For example, if you want to restrict execution to functions found in /usr/local/bin.