Skip to content
Snippets Groups Projects
Commit b701bbd8 authored by Lukas Reschke's avatar Lukas Reschke
Browse files

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
parent 76c511de
No related branches found
No related tags found
No related merge requests found
...@@ -14,6 +14,8 @@ class APCu extends APC { ...@@ -14,6 +14,8 @@ class APCu extends APC {
return false; return false;
} elseif (!ini_get('apc.enable_cli') && \OC::$CLI) { } elseif (!ini_get('apc.enable_cli') && \OC::$CLI) {
return false; return false;
} elseif (version_compare(phpversion('apc'), '4.0.6') === -1) {
return false;
} else { } else {
return true; return true;
} }
......
...@@ -85,6 +85,10 @@ $template->assign('databaseOverload', $databaseOverload); ...@@ -85,6 +85,10 @@ $template->assign('databaseOverload', $databaseOverload);
// warn if Windows is used // warn if Windows is used
$template->assign('WindowsWarning', OC_Util::runningOnWindows()); $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 // add hardcoded forms from the template
$forms = OC_App::getForms('admin'); $forms = OC_App::getForms('admin');
$l = OC_L10N::get('settings'); $l = OC_L10N::get('settings');
......
...@@ -143,9 +143,24 @@ if ($_['WindowsWarning']) { ...@@ -143,9 +143,24 @@ if ($_['WindowsWarning']) {
</p> </p>
</div> </div>
<?php <?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 module fileinfo available?
if (!$_['has_fileinfo']) { if (!$_['has_fileinfo']) {
?> ?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment