From de20376cc1b1a640c2e38eba8b71685152c23735 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Tue, 22 Nov 2011 22:56:00 +0000 Subject: [PATCH] (bug 29747) eAccelerator shared memory caching has been removed since it is now disabled by default and is buggy. APC, XCache and WinCache are not affected. As Brion points out in , the shared memory functions are very buggy. In fact, eAccelerator has disabled the shared memory functions by default for awhile now. I didn't touch APC, XCache or WinCache, but I imagine they suffer from the same problems. --- RELEASE-NOTES-1.19 | 2 ++ includes/AutoLoader.php | 1 - includes/DefaultSettings.php | 3 +- includes/Defines.php | 2 +- includes/LocalisationCache.php | 2 +- includes/installer/Installer.i18n.php | 6 ++-- includes/installer/Installer.php | 1 - includes/objectcache/ObjectCache.php | 4 +-- includes/objectcache/eAccelBagOStuff.php | 46 ------------------------ 9 files changed, 8 insertions(+), 59 deletions(-) delete mode 100644 includes/objectcache/eAccelBagOStuff.php diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index 9dd94ec7d6..a7c7542df1 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -153,6 +153,8 @@ production. was specified. * (bug 30368) Special:Newpages now shows the new page name for moved pages * (bug 1697) The way to search blocked usernames in block log should be clearer +* (bug 29747) eAccelerator shared memory caching has been removed since it is + now disabled by default and is buggy. APC, XCache and WinCache are not affected. === API changes in 1.19 === * (bug 19838) siprop=interwikimap can now use the interwiki cache. diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index fc4467d1d3..8d2ec0eb82 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -598,7 +598,6 @@ $wgAutoloadLocalClasses = array( 'APCBagOStuff' => 'includes/objectcache/APCBagOStuff.php', 'BagOStuff' => 'includes/objectcache/BagOStuff.php', 'DBABagOStuff' => 'includes/objectcache/DBABagOStuff.php', - 'eAccelBagOStuff' => 'includes/objectcache/eAccelBagOStuff.php', 'EhcacheBagOStuff' => 'includes/objectcache/EhcacheBagOStuff.php', 'EmptyBagOStuff' => 'includes/objectcache/EmptyBagOStuff.php', 'FakeMemCachedClient' => 'includes/objectcache/EmptyBagOStuff.php', diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 92fe00ac58..14b4e942d9 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1492,7 +1492,7 @@ $wgCacheDirectory = false; * - CACHE_NONE: Do not cache * - CACHE_DB: Store cache objects in the DB * - CACHE_MEMCACHED: MemCached, must specify servers in $wgMemCachedServers - * - CACHE_ACCEL: eAccelerator, APC, XCache or WinCache + * - CACHE_ACCEL: APC, XCache or WinCache * - CACHE_DBA: Use PHP's DBA extension to store in a DBM-style * database. This is slow, and is not recommended for * anything other than debugging. @@ -1542,7 +1542,6 @@ $wgObjectCaches = array( CACHE_ACCEL => array( 'factory' => 'ObjectCache::newAccelerator' ), CACHE_MEMCACHED => array( 'factory' => 'ObjectCache::newMemcached' ), - 'eaccelerator' => array( 'class' => 'eAccelBagOStuff' ), 'apc' => array( 'class' => 'APCBagOStuff' ), 'xcache' => array( 'class' => 'XCacheBagOStuff' ), 'wincache' => array( 'class' => 'WinCacheBagOStuff' ), diff --git a/includes/Defines.php b/includes/Defines.php index fc39af5698..26deb2baf3 100644 --- a/includes/Defines.php +++ b/includes/Defines.php @@ -92,7 +92,7 @@ define( 'CACHE_ANYTHING', -1 ); // Use anything, as long as it works define( 'CACHE_NONE', 0 ); // Do not cache define( 'CACHE_DB', 1 ); // Store cache objects in the DB define( 'CACHE_MEMCACHED', 2 ); // MemCached, must specify servers in $wgMemCacheServers -define( 'CACHE_ACCEL', 3 ); // eAccelerator +define( 'CACHE_ACCEL', 3 ); // APC, XCache or WinCache define( 'CACHE_DBA', 4 ); // Use PHP's DBA extension to store in a DBM-style database /**@}*/ diff --git a/includes/LocalisationCache.php b/includes/LocalisationCache.php index ad707dc18a..c44be13f70 100644 --- a/includes/LocalisationCache.php +++ b/includes/LocalisationCache.php @@ -842,7 +842,7 @@ interface LCStore { /** * LCStore implementation which uses PHP accelerator to store data. - * This will work if one of XCache, eAccelerator, or APC cacher is configured. + * This will work if one of XCache, WinCache or APC cacher is configured. * (See ObjectCache.php) */ class LCStore_Accel implements LCStore { diff --git a/includes/installer/Installer.i18n.php b/includes/installer/Installer.i18n.php index d9f397a25f..955f393d2e 100644 --- a/includes/installer/Installer.i18n.php +++ b/includes/installer/Installer.i18n.php @@ -134,9 +134,8 @@ This is probably too low. The installation may fail!", 'config-xcache' => '[http://xcache.lighttpd.net/ XCache] is installed', 'config-apc' => '[http://www.php.net/apc APC] is installed', - 'config-eaccel' => '[http://eaccelerator.sourceforge.net/ eAccelerator] is installed', 'config-wincache' => '[http://www.iis.net/download/WinCacheForPhp WinCache] is installed', - 'config-no-cache' => "'''Warning:''' Could not find [http://eaccelerator.sourceforge.net eAccelerator], [http://www.php.net/apc APC], [http://xcache.lighttpd.net/ XCache] or [http://www.iis.net/download/WinCacheForPhp WinCache]. + '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]. Object caching is not enabled.", 'config-mod-security' => "'''Warning''': your web server has [http://modsecurity.org/ mod_security] enabled. If misconfigured, it can cause problems for MediaWiki or other software that allows users to post arbitrary content. Refer to [http://modsecurity.org/documentation/ mod_security documentation] or contact your host's support if you encounter random errors.", @@ -472,7 +471,7 @@ Enter the license name manually.', 'config-cache-help' => 'Object caching is used to improve the speed of MediaWiki by caching frequently used data. Medium to large sites are highly encouraged to enable this, and small sites will see benefits as well.', 'config-cache-none' => 'No caching (no functionality is removed, but speed may be impacted on larger wiki sites)', - 'config-cache-accel' => 'PHP object caching (APC, eAccelerator, XCache or WinCache)', + 'config-cache-accel' => 'PHP object caching (APC, XCache or WinCache)', 'config-cache-memcached' => 'Use Memcached (requires additional setup and configuration)', 'config-memcached-servers' => 'Memcached servers:', 'config-memcached-help' => 'List of IP addresses to use for Memcached. @@ -606,7 +605,6 @@ Parameters: * $1 is the configured memory_limit.', 'config-xcache' => 'Message indicates if this program is available', 'config-apc' => 'Message indicates if this program is available', - 'config-eaccel' => 'Message indicates if this program is available', 'config-wincache' => 'Message indicates if this program is available', 'config-imagemagick' => '$1 is ImageMagick\'s convert executable file name. diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index 35d4ddfbb6..3e8a88b5d7 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -205,7 +205,6 @@ abstract class Installer { protected $objectCaches = array( 'xcache' => 'xcache_get', 'apc' => 'apc_fetch', - 'eaccel' => 'eaccelerator_get', 'wincache' => 'wincache_ucache_get' ); diff --git a/includes/objectcache/ObjectCache.php b/includes/objectcache/ObjectCache.php index a9c5207866..77ca837142 100644 --- a/includes/objectcache/ObjectCache.php +++ b/includes/objectcache/ObjectCache.php @@ -89,9 +89,7 @@ class ObjectCache { * @return ObjectCache */ static function newAccelerator( $params ) { - if ( function_exists( 'eaccelerator_get' ) ) { - $id = 'eaccelerator'; - } elseif ( function_exists( 'apc_fetch') ) { + if ( function_exists( 'apc_fetch') ) { $id = 'apc'; } elseif( function_exists( 'xcache_get' ) && wfIniGetBool( 'xcache.var_size' ) ) { $id = 'xcache'; diff --git a/includes/objectcache/eAccelBagOStuff.php b/includes/objectcache/eAccelBagOStuff.php deleted file mode 100644 index 30d24e8019..0000000000 --- a/includes/objectcache/eAccelBagOStuff.php +++ /dev/null @@ -1,46 +0,0 @@ -