[BlueOnyx:26047] Re: php shell_exec() or exec() always returns null

Michael Stauber mstauber at blueonyx.it
Thu Mar 23 13:15:27 -05 2023


Hi Brent,

> Maybe it's not following the config in the include file for some reason?

Ah, yes. That's it, because this wholly depends on what type of PHP 
implementation you use for the Vsite in question:

DSO or DSO/mod_ruid2: 	PHP-Settings from Apache include are honored

suPHP: Aren't honored, Vsite has it's own php.ini for that

PHP-FPM: Aren't honored, Vsite has it's own PHP-FPM pool file for that


Now even for DSO or DSO/mod_ruid2 there are special cases. Some config 
options for PHP are server wide and cannot be set on a per Vsite (or per 
<Virtualhost>) level.

See: https://www.php.net/manual/en/ini.core.php

-------------------------------------------------------------------------
  disable_functions string

     This directive allows you to disable certain functions. It takes on
     a comma-delimited list of function names.

     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.
-------------------------------------------------------------------------

Generally most of the options you find under "Server Management" / 
"Security" / "PHP" are such "php_admin" functions that must go into 
php.ini and the GUI usually takes care of that for all relevant PHP 
versions and implementations that are or may be installed.

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list