From 3afe5d1c3420a012163ab6794ff63f68acf37c5e Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 5 Nov 2006 21:44:20 +0100 Subject: PHP version check in the installer darcs-hash:20061105204420-7ad00-2b80d8ceb37b48ccdaa10545ea6fb9bddb58529b.gz --- install.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'install.php') diff --git a/install.php b/install.php index 33594e491..c9809c937 100644 --- a/install.php +++ b/install.php @@ -310,7 +310,7 @@ EOT; $output .= "* @ALL 8\n"; } - $output .= "* @admin 255\n"; + $output .= "* @admin 255\n"; $ok = $ok && fileWrite(DOKU_LOCAL.'acl.auth.php', $output); } return $ok; @@ -409,13 +409,20 @@ function check_permissions(){ } /** - * Check the availability of functions used in DokuWiki + * Check the availability of functions used in DokuWiki and the PHP version * * @author Andreas Gohr */ function check_functions(){ global $error; global $lang; + $ok = true; + + if(version_compare(phpversion(),'4.3.3','<')){ + $error[] = sprintf($lang['i_phpver'],phpversion(),'4.3.3'); + $ok = false; + } + $funcs = explode(' ','addslashes basename call_user_func chmod copy fgets '. 'file file_exists fseek flush filesize ftell fopen '. 'glob header ignore_user_abort ini_get mail mkdir '. @@ -427,7 +434,6 @@ function check_functions(){ $funcs[] = 'utf8_decode'; } - $ok = true; foreach($funcs as $func){ if(!function_exists($func)){ $error[] = sprintf($lang['i_funcna'],$func); -- cgit v1.2.3