From 02c3f68048a252bc60273b05fa8e16f41cd6e0db Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Thu, 7 Jan 2016 13:21:11 -0800 Subject: [PATCH] installer: Say "APCu" for PHP >= 5.5 Pre-PHP 5.5 the extension was called "APC", and provided opcode caching and userland object caching. In 5.5, the opcode caching was built-in to PHP, and the userland object caching was moved into an extension named "APCu". Bug: T61998 Change-Id: Id6f4a87bfdb59b2592a56aea9450611238e313ad --- includes/installer/Installer.php | 8 +++++++- includes/installer/i18n/en.json | 1 + includes/installer/i18n/qqq.json | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index b863adcae1..ea700c7382 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -883,7 +883,13 @@ abstract class Installer { } if ( !$caches ) { - $this->showMessage( 'config-no-cache' ); + $key = 'config-no-cache'; + // PHP >=5.5 is called APCu, earlier versions use APC (T61998). + if ( !wfIsHHVM() && version_compare( PHP_VERSION, '5.5', '>=' ) ) { + // config-no-cache-apcu + $key .= '-apcu'; + } + $this->showMessage( $key ); } $this->setVar( '_Caches', $caches ); diff --git a/includes/installer/i18n/en.json b/includes/installer/i18n/en.json index ac3178f3e1..f2ec7a7502 100644 --- a/includes/installer/i18n/en.json +++ b/includes/installer/i18n/en.json @@ -69,6 +69,7 @@ "config-apc": "[http://www.php.net/apc APC] is installed", "config-wincache": "[http://www.iis.net/download/WinCacheForPhp WinCache] is installed", "config-no-cache": "Warning: Could not find [http://www.php.net/apc APC], [http://xcache.lighttpd.net/ XCache] or [http://www.iis.net/download/WinCacheForPhp WinCache].\nObject caching is not enabled.", + "config-no-cache-apcu": "Warning: Could not find [http://www.php.net/apcu APCu], [http://xcache.lighttpd.net/ XCache] or [http://www.iis.net/download/WinCacheForPhp WinCache].\nObject caching is not enabled.", "config-mod-security": "Warning: Your web server has [http://modsecurity.org/ mod_security]/mod_security2 enabled. Many common configurations of this will cause problems for MediaWiki and other software that allows users to post arbitrary content.\nIf possible, this should be disabled. Otherwise, refer to [http://modsecurity.org/documentation/ mod_security documentation] or contact your host's support if you encounter random errors.", "config-diff3-bad": "GNU diff3 not found.", "config-git": "Found the Git version control software: $1.", diff --git a/includes/installer/i18n/qqq.json b/includes/installer/i18n/qqq.json index bb42d88f62..372b228fa2 100644 --- a/includes/installer/i18n/qqq.json +++ b/includes/installer/i18n/qqq.json @@ -87,6 +87,7 @@ "config-apc": "Message indicates if this program is available", "config-wincache": "Message indicates if this program is available", "config-no-cache": "Status message in the MediaWiki installer environment checks.", + "config-no-cache-apcu": "Status message in the MediaWiki installer environment checks.", "config-mod-security": "Status message in the MediaWiki installer environment checks.", "config-diff3-bad": "Status message in the MediaWiki installer environment checks.", "config-git": "Message if Git version control software is available.\nParameter:\n* $1 is the Git executable file name.", -- 2.20.1