How to enable shell_exec


(Andrew) #1

As per a few other posts I found, I’ve got the System Check message, in Other functions

shell_exec
You need to enable this built-in function.

But none of the other forum posts have any information on what shell_exec is or how to enable it on any platform.
I’m using a Hostinger server with the following:

  • PHP Version - 7.0
  • Apache Version - Apache/2.4
  • MariaDB Version - 10.2

I’m guessing, from this post on Stack Overflow https://stackoverflow.com/questions/24999673/how-to-enable-shell-exec-and-exec-on-php that I need root access to enable shell_exec and as I don’t have that, I’m stuck?

If you are not the root on the machine, and exec() function is disabled, then you can’t enable it by yourself.
See http://php.net/manual/en/ini.core.php#ini.disable-functions

disable_functions string
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.
Only internal functions can be disabled using this directive. User-defined functions are unaffected
This directive must be set in php.ini For example, you cannot set this in httpd.conf.

Thanks


(Fabian Dellwing) #2

Please consult your shared hosting provider if he is willing to support you on this reason. Matomo should run relatively smooth without it.


(Andrew) #3

Please consult your shared hosting provider if he is willing to support you on this reason. Matomo should run relatively smooth without it.

Thanks for the response. Guess I’ll have to do without it (I checked and would have to change my hosting package to have a dedicated Virtual server to get the ability to use shell_exec etc.