XF 2.0 Your server has disabled a core PHP function exec

vbuser

Active member
I'm upgrading my forum and received a warning:
Your server has disabled a core PHP function exec via the disable_functions directive in php.ini. This may cause unexpected problems in XenForo.

My INI file for PHP 7.2 has no value set:
; This directive allows you to disable certain functions for security reasons.
; It receives a comma-delimited list of function names.
; http://php.net/disable-functions
disable_functions =

Do I change the last line to:

disable_functions = exec
 
You don't have to enable it (it's just a warning), though there may be some functions that require this. Notably, XFMG does use it (and if we ever brought in something like video thumbnailing, it'd need it too).

However, you can check your PHP info from within the control panel (admin.php?tools/phpinfo). You'll likely see that the function is disabled via that, though it doesn't necessarily tell you where it's coming from.
 
We only explicitly check for exec (as that happens to be the function we use), though if the functions were disabled for security reasons, then allowing one is effectively no different than allowing all of them.
 
Top Bottom