Forum archive
Enabling Mediawiki Extensions
I am trying to enable mediawiki extensions in my turnkey installation and it is not working. The instructions available here are for either an older or newer version than I have.
In my mediawiki, there is a dedicated etc/mediawiki-extensions folder, rather than an extensions sub-folder in etc/mediawiki, as per the above guidelines. It is in this sub-folder that the extensions.php file is found. However, unlike the file in the above link, mine appears to auto-load all extensions in the /etc/mediawiki-extensions/extensions-enabled folder. This is the file itself:
<?php
// Include base functions
include( '/usr/share/mediawiki-extensions/base/ExtensionFunctions.php' ) ;
$mw_debian_extensions_dir = "/etc/mediawiki-extensions/extensions-enabled";
// Including all enabled extensions.
if ( is_dir( $mw_debian_extensions_dir )
&&
$dh = opendir( $mw_debian_extensions_dir ) ) {
while ( ( $file = readdir( $dh ) ) !== false ) {
$absolute_file = $mw_debian_extensions_dir . DIRECTORY_SEPARATOR . $file ;
if ( preg_match( "/.php$/",$file ) && file_exists( $absolute_file ) &&
is_readable( $absolute_file ) ) {
include_once( $absolute_file );
}
}
closedir( $dh );
}
?>...so I copied the desired extensions (Cite.php) from the etc/mediawiki-extensions/extensions-available folder to the etc/mediawiki-extensions/extensions-enabled folder, and it broke my wiki (e.g. when I try to access the wiki I get an "The wiki page isn't working, is currently unable to handle this request". Chaining the file permissions to allow read/write/execute of the file by all user/group/other did not fix the issue, but removing the file restores functionality.
What am I doing wrong?
Bryan
No problem, ghosts in the machine and all that.