Open ajquick opened 5 years ago
This is a tricky thing to fix given the range of various different possible installs. Maintenance scripts DO work if accessed from the root MW directory.
This works:
php maintenance/script.php
This does not (from maintenance directory):
php script.php
MediaWiki's extension page describes a potential fix: https://www.mediawiki.org/wiki/Manual:Extensions#Installing_an_extension
Some extensions can conflict with maintenance scripts, for example if they directly access $_SERVER (not recommended). In this case they can be wrapped in the conditional so maintenance scripts can still run.
//for mw.v 1.24.x or less if ( !$wgCommandLineMode ) { require_once "$IP/extensions/extension_name/extension_name.php"; } //for mw.v 1.25.x or above if ( !$wgCommandLineMode ) { wfLoadExtension ( '<extension-name>' ); }
Occasionally the Mediawiki Maintenance scripts will error out.
This will be fixed in the next version.