Open main menu

Manual:$wgUseEAccelShm


Other languages:
English • ‎français • ‎polski • ‎日本語
Memcached settings: $wgUseEAccelShm
You can use this for persistent caching where your wiki runs on a single server.
Introduced in version:1.5.0
Removed in version:1.5.0
Allowed values:Unspecified
Default value:false

DetailsEdit

MediaWiki version: 1.5

You can use this for persistent caching where your wiki runs on a single server. Enabled by default if eAccelerator is installed. Mutually exclusive with memcached and Turck MMCache, the preference order being memcached first, Turck MMCache second, and eAccelerator third. Most of the code to support this is directly copied from the Turck code.

Installing eAccelerator from SVNEdit

MediaWiki requires that you have eaccelerator shared memory functions (like eaccelerator_get, the one she tests for during installation) mailarchive:wikitech-l/2007-September/033680.html. Assuming you have one PHP installation.

  • Download and cd eaccelerator
svn --username anonymous --password anonymous co http://dev.eaccelerator.net/eaccelerator/trunk eaccelerator
  • Compile and install
phpize
sudo ./configure --with-eaccelerator-shared-memory --with-eaccelerator-sessions
sudo make
sudo make install
  • Configure

Now you need to make PHP aware of your installation, so you need to find and edit/create a configuration file that is readable by PHP (php.ini). In Ubuntu, it is found in /etc/php5/conf.d (anything there will be read), so make/edit a file with the following:

extension="eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/var/cache/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
sudo mkdir /var/cache/eaccelerator
sudo chown www-data /var/cache/eaccelerator
sudo /etc/init.d/apache2 restart

www-data may be different as it is the name of the user Apache runs on.

Now you can choose eAccelerator during MediaWiki installation.

NoteEdit

eAccelerator 0.9.5 causes the MediaWiki 1.9.3 installer to crash when run for a second time under PHP 5.2.x, and potentially other problems. The patch at https://www.eaccelerator.net/ticket/231 resolves this issue with version 0.9.5. This issue is already fixed in the upcoming 0.9.6 release.