[Pkg-owncloud-commits] [owncloud] 36/95: Use APCu only if available in version 4.0.6 and higher
David Prévot
taffit at moszumanska.debian.org
Wed Mar 11 15:49:47 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v8.0.1
in repository owncloud.
commit f558ee5802aeb07035cfb5a85d64105d0d8a8e2d
Author: Lukas Reschke <lukas at owncloud.com>
Date: Mon Feb 16 22:36:08 2015 +0100
Use APCu only if available in version 4.0.6 and higher
APCu before 4.0.6 is unbelievable buggy and tend to segfault the PHP process (i.e. the whole webserver)
This potentially fixes https://github.com/owncloud/core/issues/14175
Requires a backport to stable8
---
lib/private/memcache/apcu.php | 2 ++
settings/admin.php | 4 ++++
settings/templates/admin.php | 15 +++++++++++++++
3 files changed, 21 insertions(+)
diff --git a/lib/private/memcache/apcu.php b/lib/private/memcache/apcu.php
index 7f780f3..1043690 100644
--- a/lib/private/memcache/apcu.php
+++ b/lib/private/memcache/apcu.php
@@ -14,6 +14,8 @@ class APCu extends APC {
return false;
} elseif (!ini_get('apc.enable_cli') && \OC::$CLI) {
return false;
+ } elseif (version_compare(phpversion('apc'), '4.0.6') === -1) {
+ return false;
} else {
return true;
}
diff --git a/settings/admin.php b/settings/admin.php
index bb20c66..363518e 100644
--- a/settings/admin.php
+++ b/settings/admin.php
@@ -84,6 +84,10 @@ $template->assign('databaseOverload', $databaseOverload);
// warn if Windows is used
$template->assign('WindowsWarning', OC_Util::runningOnWindows());
+// warn if outdated version of APCu is used
+$template->assign('ApcuOutdatedWarning',
+ extension_loaded('apcu') && version_compare(phpversion('apc'), '4.0.6') === -1);
+
// add hardcoded forms from the template
$forms = OC_App::getForms('admin');
$l = OC_L10N::get('settings');
diff --git a/settings/templates/admin.php b/settings/templates/admin.php
index fb4662b..1915c8c 100644
--- a/settings/templates/admin.php
+++ b/settings/templates/admin.php
@@ -143,9 +143,24 @@ if ($_['WindowsWarning']) {
</p>
</div>
+
<?php
}
+// APCU Warning if outdated
+if ($_['ApcuOutdatedWarning']) {
+ ?>
+ <div class="section">
+ <h2><?php p($l->t('APCu below version 4.0.6 installed'));?></h2>
+
+ <p class="securitywarning">
+ <?php p($l->t('APCu below version 4.0.6 is installed, for stability and performance reasons we recommend to update to a newer APCu version.')); ?>
+ </p>
+
+ </div>
+
+<?php
+}
// if module fileinfo available?
if (!$_['has_fileinfo']) {
?>
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list