aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-01-05 14:17:56 -0800
committerzotlabs <mike@macgirvin.com>2017-01-05 14:17:56 -0800
commit2312302deade5ccc2e65cd58483a4f40a8d4aea4 (patch)
treea62eccd5420b68aae6c38d3476b1168f4eeeed46 /Zotlabs
parentdfede520481f94407ef3dd3b9d622cf6c6ab98f1 (diff)
downloadvolse-hubzilla-2312302deade5ccc2e65cd58483a4f40a8d4aea4.tar.gz
volse-hubzilla-2312302deade5ccc2e65cd58483a4f40a8d4aea4.tar.bz2
volse-hubzilla-2312302deade5ccc2e65cd58483a4f40a8d4aea4.zip
setup: check disabled functions more precisely than using a string match
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Setup.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/Zotlabs/Module/Setup.php b/Zotlabs/Module/Setup.php
index b5258a28f..9c688af01 100644
--- a/Zotlabs/Module/Setup.php
+++ b/Zotlabs/Module/Setup.php
@@ -496,6 +496,11 @@ class Setup extends \Zotlabs\Web\Controller {
function check_funcs(&$checks) {
$ck_funcs = array();
+ $disabled = explode(',',ini_get('disable_functions'));
+ if($disabled)
+ array_walk($disabled,'array_trim');
+
+
// add check metadata, the real check is done bit later and return values set
$this->check_add($ck_funcs, t('libCurl PHP module'), true, true);
$this->check_add($ck_funcs, t('GD graphics PHP module'), true, true);
@@ -511,13 +516,13 @@ class Setup extends \Zotlabs\Web\Controller {
$this->check_add($ck_funcs, t('Apache mod_rewrite module'), true, true);
}
}
- if((! function_exists('exec')) || strstr(ini_get('disable_functions'),'exec')) {
+ if((! function_exists('exec')) || in_array('exec',$disabled)) {
$this->check_add($ck_funcs, t('exec'), false, true, t('Error: exec is required but is either not installed or has been disabled in php.ini'));
}
else {
$this->check_add($ck_funcs, t('exec'), true, true);
}
- if((! function_exists('shell_exec')) || strstr(ini_get('disable_functions'),'shell_exec')) {
+ if((! function_exists('shell_exec')) || in_array('shell_exec',$disabled)) {
$this->check_add($ck_funcs, t('shell_exec'), false, true, t('Error: shell_exec is required but is either not installed or has been disabled in php.ini'));
}
else {