Page MenuHomePhabricator

Installation refers to Turke MMcache. But this is now superseded by eAccelerator.
Closed, ResolvedPublic

Assigned To
None
Authored By
bzimport
Jan 14 2005, 6:49 AM
Referenced Files
F1782: index.php.CVS.1.93.patch
Nov 21 2014, 8:09 PM
F1781: index.php.CVS.1.93.patch
Nov 21 2014, 8:09 PM
F1780: ObjectCache.php.CVS.1.15.patch
Nov 21 2014, 8:09 PM
F1779: DefaultSettings.php.CVS.1.249.patch
Nov 21 2014, 8:09 PM

Description

Author: contactbox

Description:
Turke MMcache has ceased development. It does not work with PHP 4.3.10, PHP 5,
or above. The live fork is now known as eAccelerator (eaccelerator.sf.net),
currently in beta testing.

The installation page for Mediawiki should certainly report this (and perhaps
check for the other common PHP caching programs) if used in place of MMcache.
At present it merely reports MMcache is not being used, which seems to a user,
to be an error.


Version: unspecified
Severity: normal

Details

Reference
bz1328
TitleReferenceAuthorSource BranchDest Branch
Add smashpig listener server config to allow Authorization headerrepos/releng/dev-images!37jgleesonsmashpig-auth-headermain
Customize query in GitLab

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:09 PM
bzimport set Reference to bz1328.

MediaWiki itself doesn't know or care about the opcode caching solution used on the
PHP installation.

There is a somewhat experimental option to use Turck MMCache's data-caching
functions (independently of whether you're caching compiled PHP bytecode), which
of course only works if those functions are present.

contactbox wrote:

These same object caching functions are still present in eAccelerator (which is basically
a bugfix version of MMcache), but are not recognised by mediawiki. Reporting of it
as "absent" on the install page doesnt make clear what the implications of the "absence"
are.

Would you mind providing a patch which corrects the detection?

contactbox wrote:

I'd do so if I was able, but I lack the ability. As best I understand it, the few places
mediawiki looks for the presence of mmcache functions, it should also look for the
equivalent eaccelerator functions instead, thats all.

From then on, as I understand it, they both use identical names and structures, bar the
global replace of "mmcache..." --> "eaccelerator..." wherever it occurs (both in variable
names and (presumably) function names).

Yes, the function names being different would explain why it doesn't work.

Astronouth7303 wrote:

I was able to do this in 1.4beta4 (using a local wiki). There are two ways to do this: the full change and the hack.
The full change maintains support for Turck MMCache, and integrates it into the installer. The hack just gets it to
work.

For the hack, open up /includes/ObjectCache.php (relative to the install dir), and find the TurckBagOStuff class (line
418 in mine). In the class, replace the Turck API calls (mmcache_*) with eAccelerator calls (eaccelerator_*). Save it.
Then go into /LocalSettings.php and override the setting for $wgUseTurckShm (line 129). Either change the function
name, or just set it to true at the bottom.

For the full change (which is probably excessive), I created an eAccelBagOStuff class. This required changes to
numerous files. This includes ObjectCache.php, Setup.php, and config/index.php. If patches are not posted for this yet,
they will be soon.

Astronouth7303 wrote:

A patch to includes/ObjectCache.php to add the eAccelBagOStuff class.

This is one of the patches for the full change method mentioned in my previous
comment.

attachment ObjectCache.php.1.4b4.patch ignored as obsolete

Astronouth7303 wrote:

A patch to includes/Setup.php to use the eAccelBagOStuff class.

This is one of the patches for the full change method mentioned in my previous
comment.

attachment Setup.php.1.4b4.patch ignored as obsolete

Astronouth7303 wrote:

A patch to config/index.php to use the eAccelBagOStuff class.

This is one of the patches for the full change method mentioned in my previous
comment.

It should be noted that this patch changes both the LocalSettings.php template
and index.php itself. Especially not that it adds the $wgUseEAccelShm variable
to LocalSettings.php.

attachment config_index.php.1.4b4.patch ignored as obsolete

Astronouth7303 wrote:

Patch for config/index.php, CVS version 1.93

This is based on version 1.93 of the file.

attachment index.php.CVS.1.93.patch ignored as obsolete

Astronouth7303 wrote:

Patch for includes/DefaultSettings.php, CVS version 1.249

Attached:

Astronouth7303 wrote:

Patch for includes/ObjectCache.php, CVS version 1.15

Attached:

Astronouth7303 wrote:

Patch for includes/Setup.php, CVS version 1.117

attachment Setup.php.CVS.1.117.patch ignored as obsolete

Astronouth7303 wrote:

Posted another batch of patches, this time for CVS. The file version is noted
with the patch.

Astronouth7303 wrote:

Patch for includes/Setup.php, CVS version 1.117

Fixes a bug in the previous patch relating to the initialization of the
properties of $conf.

Attached:

Astronouth7303 wrote:

Patch for config/index.php, CVS version 1.93

The previous 'fix' was for the wrong file.

Attached:

Since this is marked as fixed-in-cvs and we're starting the 1.5 beta cycle, resolving as FIXED.