Last modified: 2010-05-15 14:35:54 UTC
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.
http://eaccelerator.sourceforge.net/
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.
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?
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.
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.
Created attachment 206 [details] 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.
Created attachment 207 [details] 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.
Created attachment 208 [details] 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.
patch pending.
Created attachment 301 [details] Patch for config/index.php, CVS version 1.93 This is based on version 1.93 of the file.
Created attachment 302 [details] Patch for includes/DefaultSettings.php, CVS version 1.249
Created attachment 303 [details] Patch for includes/ObjectCache.php, CVS version 1.15
Created attachment 304 [details] Patch for includes/Setup.php, CVS version 1.117
Posted another batch of patches, this time for CVS. The file version is noted with the patch.
Created attachment 320 [details] 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.
Created attachment 321 [details] Patch for config/index.php, CVS version 1.93 The previous 'fix' was for the wrong file.
Since this is marked as fixed-in-cvs and we're starting the 1.5 beta cycle, resolving as FIXED.