summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxjm2016-12-16 23:25:48 (GMT)
committerxjm2016-12-16 23:25:48 (GMT)
commite313a51e5cdb96f3b49eb1a9cf814ca4641a53ac (patch)
tree4c65765e7312650acf5eeba1adb8da3ba2cba421
parent150f2e87b001864d63c331e9d8e56d8151e28855 (diff)
Issue #2836434 by alexpott, oriol_e9g, NickWilde, bradjones1, AdamPS, carteriii, gapple, tstoeckler, soulsymphonies: We should not ever recommend APC in Drupal 8
-rw-r--r--core/modules/file/file.install6
-rw-r--r--core/modules/file/file.module2
2 files changed, 2 insertions, 6 deletions
diff --git a/core/modules/file/file.install b/core/modules/file/file.install
index 05eedf0..d371384 100644
--- a/core/modules/file/file.install
+++ b/core/modules/file/file.install
@@ -96,13 +96,9 @@ function file_requirements($phase) {
$value = t('Not enabled');
$description = t('Your server is not capable of displaying file upload progress. File upload progress requires PHP be run with mod_php or PHP-FPM and not as FastCGI.');
}
- elseif (!$implementation && extension_loaded('apcu')) {
- $value = t('Not enabled');
- $description = t('Your server is capable of displaying file upload progress through APC, but it is not enabled. Add <code>apc.rfc1867 = 1</code> to your php.ini configuration. Alternatively, it is recommended to use <a href="http://pecl.php.net/package/uploadprogress">PECL uploadprogress</a>, which supports more than one simultaneous upload.');
- }
elseif (!$implementation) {
$value = t('Not enabled');
- $description = t('Your server is capable of displaying file upload progress, but does not have the required libraries. It is recommended to install the <a href="http://pecl.php.net/package/uploadprogress">PECL uploadprogress library</a> (preferred) or to install <a href="http://php.net/apcu">APC</a>.');
+ $description = t('Your server is capable of displaying file upload progress, but does not have the required libraries. It is recommended to install the <a href="http://pecl.php.net/package/uploadprogress">PECL uploadprogress library</a>.');
}
elseif ($implementation == 'apc') {
$value = t('Enabled (<a href="http://php.net/manual/apcu.configuration.php#ini.apcu.rfc1867">APC RFC1867</a>)');
diff --git a/core/modules/file/file.module b/core/modules/file/file.module
index c63fff4..687a62c 100644
--- a/core/modules/file/file.module
+++ b/core/modules/file/file.module
@@ -929,7 +929,7 @@ function file_progress_implementation() {
if (extension_loaded('uploadprogress')) {
$implementation = 'uploadprogress';
}
- elseif (extension_loaded('apc') && ini_get('apc.rfc1867')) {
+ elseif (version_compare(PHP_VERSION, '7', '<') && extension_loaded('apc') && ini_get('apc.rfc1867')) {
$implementation = 'apc';
}
}