summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <morris.jobke@gmail.com>2013-12-04 01:49:54 -0800
committerMorris Jobke <morris.jobke@gmail.com>2013-12-04 01:49:54 -0800
commitd73875b2b4691d9d9dbd630cce43311f61dd7a28 (patch)
tree1fa48d24cbb1ee04757448d8df9b6cb632a3d3be
parent8fdbb988995099fc2bd79ca5704120873952651b (diff)
parent61296ed7bbf638e8285f29fa65fc4a0ad6c2529a (diff)
downloadnextcloud-server-d73875b2b4691d9d9dbd630cce43311f61dd7a28.tar.gz
nextcloud-server-d73875b2b4691d9d9dbd630cce43311f61dd7a28.zip
Merge pull request #6169 from owncloud/php_version_warning
PHP version warning
-rwxr-xr-xlib/private/util.php12
-rwxr-xr-xsettings/admin.php1
-rw-r--r--settings/templates/admin.php14
3 files changed, 25 insertions, 2 deletions
diff --git a/lib/private/util.php b/lib/private/util.php
index 38de07abc92..a73564b3f68 100755
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -437,9 +437,9 @@ class OC_Util {
);
$webServerRestart = true;
}
- if(version_compare(phpversion(), '5.3.8', '<')) {
+ if(version_compare(phpversion(), '5.3.3', '<')) {
$errors[] = array(
- 'error'=>'PHP 5.3.8 or higher is required.',
+ 'error'=>'PHP 5.3.3 or higher is required.',
'hint'=>'Please ask your server administrator to update PHP to the latest version.'
.' Your PHP version is no longer supported by ownCloud and the PHP community.'
);
@@ -875,6 +875,14 @@ class OC_Util {
}
/**
+ * @brief Check if a PHP version older then 5.3.8 is installed.
+ * @return bool
+ */
+ public static function isPHPoutdated() {
+ return version_compare(phpversion(), '5.3.8', '<');
+ }
+
+ /**
* @brief Check if the ownCloud server can connect to the internet
* @return bool
*/
diff --git a/settings/admin.php b/settings/admin.php
index 0d3868afea8..c0e4570658a 100755
--- a/settings/admin.php
+++ b/settings/admin.php
@@ -28,6 +28,7 @@ $tmpl->assign('internetconnectionworking', OC_Util::isInternetConnectionEnabled(
$tmpl->assign('isLocaleWorking', OC_Util::isSetLocaleWorking());
$tmpl->assign('isWebDavWorking', OC_Util::isWebDAVWorking());
$tmpl->assign('has_fileinfo', OC_Util::fileInfoLoaded());
+$tmpl->assign('old_php', OC_Util::isPHPoutdated());
$tmpl->assign('backgroundjobs_mode', OC_Appconfig::getValue('core', 'backgroundjobs_mode', 'ajax'));
$tmpl->assign('shareAPIEnabled', OC_Appconfig::getValue('core', 'shareapi_enabled', 'yes'));
diff --git a/settings/templates/admin.php b/settings/templates/admin.php
index 523bbd66248..0eabffb9316 100644
--- a/settings/templates/admin.php
+++ b/settings/templates/admin.php
@@ -72,6 +72,20 @@ if (!$_['has_fileinfo']) {
<?php
}
+// is PHP at least at 5.3.8?
+if ($_['old_php']) {
+ ?>
+<fieldset class="personalblock">
+ <h2><?php p($l->t('Your PHP version is outdated'));?></h2>
+
+ <span class="connectionwarning">
+ <?php p($l->t('Your PHP version is outdated. We strongly recommend to update to 5.3.8 or newer because older versions are known to be broken. It is possible that this installation is not working correctly.')); ?>
+ </span>
+
+</fieldset>
+<?php
+}
+
// is locale working ?
if (!$_['isLocaleWorking']) {
?>