summaryrefslogtreecommitdiff
path: root/install.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2006-11-05 21:44:20 +0100
committerAndreas Gohr <andi@splitbrain.org>2006-11-05 21:44:20 +0100
commit3afe5d1c3420a012163ab6794ff63f68acf37c5e (patch)
treea1256531cd9ccd8c419a0b33100418010a84e141 /install.php
parent6b06b65228c9fbd6e8e45658458b14a0e8c2cdfc (diff)
downloadrpg-3afe5d1c3420a012163ab6794ff63f68acf37c5e.tar.gz
rpg-3afe5d1c3420a012163ab6794ff63f68acf37c5e.tar.bz2
PHP version check in the installer
darcs-hash:20061105204420-7ad00-2b80d8ceb37b48ccdaa10545ea6fb9bddb58529b.gz
Diffstat (limited to 'install.php')
-rw-r--r--install.php12
1 files changed, 9 insertions, 3 deletions
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 <andi@splitbrain.org>
*/
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);