From 150f2e87b001864d63c331e9d8e56d8151e28855 Mon Sep 17 00:00:00 2001 From: xjm <xjm@65776.no-reply.drupal.org> Date: Fri, 16 Dec 2016 10:16:36 -0600 Subject: [PATCH] Revert "Issue #2718253 by oriol_e9g, alexpott, tstoeckler, bradjones1, soulsymphonies, carteriii, NickWilde, gapple, AdamPS: Upload progress w/PHP 7 (& recommendation on status report)" This reverts commit bd4dcd10f77f6e99e99b37b841eb1403814bdfc0. --- core/modules/file/file.install | 6 +++++- core/modules/file/file.module | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/modules/file/file.install b/core/modules/file/file.install index d371384664e8..05eedf0f9533 100644 --- a/core/modules/file/file.install +++ b/core/modules/file/file.install @@ -96,9 +96,13 @@ 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>.'); + $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>.'); } 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 687a62c70b29..c63fff4358fc 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 (version_compare(PHP_VERSION, '7', '<') && extension_loaded('apc') && ini_get('apc.rfc1867')) { + elseif (extension_loaded('apc') && ini_get('apc.rfc1867')) { $implementation = 'apc'; } } -- GitLab