From a65f03c8810c92b631239acd346d4ec443d288ce Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 18 Aug 2016 19:25:43 +0000 Subject: [PATCH] Added a check for PHP version in dbinstall.php. --- WEB-INF/templates/footer.tpl | 2 +- dbinstall.php | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 94d0bfe2..0bc4b8b7 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.9.29.3524 | Copyright © Anuko | +  Anuko Time Tracker 1.9.29.3525 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/dbinstall.php b/dbinstall.php index c32695d5..49d61f1e 100755 --- a/dbinstall.php +++ b/dbinstall.php @@ -67,6 +67,14 @@ if ($request->isGet()) { echo('Error: DSN value is not defined. Check your config.php file.
'); } + // Check if PHP version is good enough. + $required_version = '5.2.1'; // Something in TCPDF library does not work below this one. + if (version_compare(phpversion(), $required_version, '>=')) { + echo('PHP version: '.phpversion().', good enough.
'); + } else { + echo('Error: PHP version is not high enough: '.phpversion().'. Required: '.$required_version.'.
'); + } + // Depending on DSN, require either mysqli or mysql extensions. if (strrpos(DSN, 'mysqli://', -strlen(DSN)) !== FALSE) { if (extension_loaded('mysqli')) { -- 2.20.1