How to enable php exec function?

Hello there, i am on OLS and latest cyberpanel with default settings.

I am trying to enable PHP exec()
but unfortunately there’s no exec option in any of the versions. Below functions are same in every version.

disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,

Someone please guide how to get it enabled.

Hello @bgmsquad Happy you are here

Go to https://SERVER_URL:8090/managephp/editPHPConfigs choose the desired php version

; This directive allows you to disable certain functions.
; It receives a comma-delimited list of function names.
disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,

Remove pcntl_exec

pcntl_exec — Executes specified program in current process space. The pcntl_exec() function works exactly like the standard (unix-style) exec() function. It differs from the regular PHP exec() function in that the process calling the pcntl_exec() is replaced with the process that gets called. This is the ideal method for creating children. PHP: pcntl_exec - Manual

from the line and save the file.You have now enabled the exec function in the server for that php version.

NOTE: this is discouraged since its a security risk. It allows attackers to execute external programs.

Hi there thanks fo reply,
But as mentioned above pcntl_exec was already removed and is still not working.
Restarted server, php settings but still its not working.
Disabled firewall completely still not working. Upgraded Cyberpanel as well.

Is there anything i am missing? like disable errors function or something like that?

Run this if the php you are enabling is the default

php -m | grep pcntl