Note that PHP configuration is enabled uppon compilation. You will have to enable HAVE_MOD_PHP_SUPPORT in Makefile , uses zend_alter_ini_entry()
to change on the fly parameters like you can do with php.ini entry.
There is several directives (see README file for more) :
and
They are evaluated in this order (if they are enabled) :
vhs_PHPsafe_modevhs_PHPopen_basedir (and also vhs_open_basedir_path / vhs_append_open_basedir)vhs_PHPdisplay_errorsvhs_PHPopt_fromdb
You have to know this order of evaluation if you don't have brain damage when you use vhs_PHPopt_fromdb and security problems that you can have because of this order of evaluation.
vhs_PHPopt_fromdb is evaluated at the end of PHP autoconfiguration. If you set :
vhs_PHPsafe_mode On
And in the field used by vhs_PHPopt_fromdb : safe_mode=Off;
Then the configuration of PHP will be safe_mode=Off.
vhs_PHPopt_fromdb will ALLWAY HAVE THE LAST WORD_ in terms of PHP configuration.
This is NOT a bug, but a feature. So you need to be 100% sure the php autoconfiguration from DB will be set to people you trust in terms of security.
mod_vhs will take his parameters from libhome or mod_ldap/mod_dbd backend using passwd field.
The format is :
<parameter>=<value>;<parameter>=<value>;
With :
* <parameter> = php.ini parameter (like safe_mode for example) * <value> = php.ini value of this parameter (On for example)
WARNINGS :
On = 1 Off = 0
Since mod_vhs use Zend functions to change the php ini values, you NEED to load mod_php before mod_vhs otherwise errors like :
Syntax error on line 269 of /etc/apache/httpd.conf: Cannot load /usr/libexec/apache/mod_vhs.so into server: /usr/libexec/apache/mod_vhs.so: undefined symbol: zend_alter_ini_entry
vhs_PHPopt_fromdb can only configure php.ini values like foo=value, but it cannot configure specific section of php.ini (eg [mysql] for example). So you'll have to keep that in mind when designing your system.