Extension talk:MaintenanceShell/Archive

Successfuly working with MediaWiki 1.??.?

edit

It works fine on Mediawiki 1.14.0. Thanks! Enzo // Same on 1.13.4. Al Maghi
It works on Mediawiki 1.16.2 using a wiki hosting service with no shell access. Lynxcub 01:07, 11 April 2011 (UTC)Reply

Commands used;
changePassword
importImages

Hey, great idea!

edit

Hey, great idea! Exactly what i was looking for to run on my rather restricted server. stupid university sysadmins :(

I dunno if this discussion page is the right place to post this, but nevermind.

I think I found some minor glitches:

  • MaintenanceShell_body.php, line 50: the & and ? are in the wrong order, swap them in order to get the list of maintenance scripts on Special:MaintenanceShell functional again
  • MaintenanceShell.php, line 41: it should say 'Location: http:// ', otherwise it renders the URL unusable
  • MaintenanceShell.php, line 50: this looks like a remainder of v0.1.0's password system to me?

Unfortunately I could not get it to run. After filling the form with, let's say checkImages and command line "--fix" and submitting, the script just returns to Special:MaintenanceShell without any further ado...

Any ideas? Any Feedback would be greatly appreciated. Please mail me in an electronically manner to user PHIL at the hostname METAPHIL in country DE :-)

Hi Phil.. sorry it didn't work for you.. I'm not sure why. I will look into the bugs you posted. I really appreciate your feedback and hopefully we'll get it working for you :) What version of MediaWiki are you using? I can only verify it should work on 1.14.0 --Frantik 23:13, 31 May 2009 (UTC)Reply
I followed up with Phil and I think we've got his problem solved... The user rights must be placed before the script call. --Frantik 19:55, 1 June 2009 (UTC)Reply
v0.2.1 addresses the bugs mentioned above --Frantik 02:57, 2 June 2009 (UTC)Reply

Where to go in order to use it

edit

Stupid question but where do you actually go to use MaintenanceShell once installed?--86.28.134.69 11:27, 4 June 2009 (UTC)Reply

Thats a great question actually lol.. you can see it on Special:SpecialPages under Wiki data and tools, or its own page Special:MaintenanceShell --Frantik 00:55, 5 June 2009 (UTC)Reply

How to get a NULL setting  ? ( "" or ' ' not working)

edit

I run the command php userOptions.php gadget-HotCat --new 1 --old ''

Result:

The script is about to change the skin for ALL USERS in the database. Users with option = '''' will be made to use '1'.

but it doesn't get the NULL setting from old ''. Doesn't work either with old "".

--almaghi 10:09, 10 June 2009 (UTC)

I'm not 100% sure.. does this command work as expected from the command line? (though I assume you're using this extension because you can't access the command line) --Frantik 19:47, 11 June 2009 (UTC)Reply
Ok it seems I'm not handling quote marks properly. i will update it --Frantik 19:51, 11 June 2009 (UTC)Reply
Yeah it does work as expected from command line. --almaghi 15:47, 15 June 2009 (UTC)Reply
Ok. Thks for your update & your extension, good job is done here ! --almaghi 15:47, 15 June 2009 (UTC)Reply
Thanks! I will release the update soon :) --Frantik 00:21, 16 June 2009 (UTC)Reply
v0.2.2 should solve this issue :) --Frantik 01:14, 19 June 2009 (UTC)Reply
v0.2.2 test: The " " works, it give a NULL value. The ' ' doesn't work. I think this last bug is not inconvenient: when ' ' doesn't work the first idea that come is to test with " ". --almaghi 08:32, 19 June 2009 (UTC)Reply
cool, that is expected. I will add support for single quotes next time. Glad to know it works --Frantik 08:56, 19 June 2009 (UTC)Reply

Problem with skin chance command

edit

I installed this on 1.13 and was executing the skin change command: userOptions.php skin --old "monobook" --new "modern" It executed and it stated that it actually performed the action. However, when I went into the accounts to check, it actually didn't work. The user skin was not changed. Could it be an issue with writing to the database? Why would it say it completed OK if it didn't make any database changes?--Valiot 11:11, 18 July 2009 (UTC)Reply

Hi, I didn't notice your comment. Unfortunately I can't give help on the individual scripts, I've only created the interface to access them. Honestly I don't even know what half of them do! --Frantik 17:19, 15 August 2009 (UTC)Reply

Working directories

edit

Hi, I want to use maintenanceShell to install FlaggedRevs and for this, i need to change the working dir to something like /wiki/maintenance/archives/ and to /wiki/extensions/FlaggedRevs/ to get the scripts from there.

Where and how should change the $wgMaintenanceShellDir ?

You set it in your LocalSettings.php file. Right now the script doesn't support Maintenance shell scripts outside of the mainenance folder. --Frantik 16:41, 31 July 2009 (UTC)Reply
The easiest way to run scripts in those other folders is to copy them into the main maintenance folder. the next version I release will support the subfolders --Frantik 15:20, 10 August 2009 (UTC)Reply

Workaround for Extension TitleKey

edit

For getting Extension:TitleKey to work I did the following:

  1. Copy rebuildTitleKeys.php from the extension folder to the maintenance folder as suggested above.
  2. As the script relies on some other maintenance scripts I had to amend the paths in rebuildTitleKeys.php like so:
 require_once  dirname( dirname( __FILE__ ) ) . "/maintenance/commandLine.inc";
 
 // In case we want to do offline initialization...
 if( !class_exists( 'TitleKey' ) ) {
 	require dirname( dirname( __FILE__ ) ). '/extensions/TitleKey/TitleKey_body.php';
 }
 
 if( isset( $options['help'] ) ) {
 	echo "Rebuilds titlekey table entries for all pages in DB.\n";
 	echo "Usage:\n";
 	echo "  php extensions/TitleKey/rebuildTitleKeys.php [--start=<page_id>]\n";
 } else {
 	$start = intval( @$options['start'] );
 	echo "Rebuilding titlekey table...\n";
 	TitleKey::populateKeys( $start );

hth --Nakohdo 12:27, 11 December 2010 (UTC)Reply

file_exists() Error

edit

I'm trying to run dumpBackup.php in MaintenanceShell (without any arguments at this stage) and get the following error: Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/home/wikipedia/common/langlist) is not within the allowed path(s): ((list of allowed paths)) in /(my wiki directory)/maintenance/commandLine.inc on line 115 --Agrestis 09:49, 6 October 2009 (UTC)Reply

this is an error in commandLine.inc (not part of my extension).. it seems like it's left over from Wikipedia since it's referencing a specific file. You can safely ignore it as it has no effect on the actual maintenance scripts --Frantik 05:04, 12 October 2009 (UTC)Reply
btw, are you using 15.1? i noticed i had to do another tweak to get this extension to work on 15.1 so i need to release an update --Frantik 05:08, 12 October 2009 (UTC)Reply
Thanks, I wasn't sure if the error was the extension or Mediawiki itself. For reference I'm using Mediawiki 1.14.0 with MaintenanceShell 0.2.2 --Agrestis 19:51, 12 October 2009 (UTC)Reply

PHP Notice: Undefined index: extension in /var/www/html/extensions/MaintenanceShell/MaintenanceShell_body.php on line 58, referer: http://wikiserver/Special:MaintenanceShell

edit

replace line 58 in maintenanceshell_body.php with

{if (($arr = pathinfo($v)) && array_key_exists('extension', $arr) && ($arr['extension'] == 'php') && (strpos($v, '.inc') === false))

i believe this is being caused by the sub directories in this folder or possibly some of the files that do not have extensions.

oops.. thanks for the heads up on that one --Frantik 14:25, 14 November 2009 (UTC)Reply

nice

edit

Installed and works nice. Two suggestions, though. Change the folders name. It's confusing and would save the extra step of changing it after the wiki goes off because something's wrong in localsettings. And two... can you specify more clearly how to use options. if you're using -r, for example, you just wrote -r or something else is needed? You mentioned something about using quotes in the main page. Other than this, kudos. Really usefull tool for all mediawikians.--Mark 03:45, 11 December 2009 (UTC)

A couple more things: The go back to maintenance shell is broken in Spanish (and probably other languages). In the Spanish case the link is to "Especial:". Also, for those using shared hosting, you need to set up your AdminSettings.php with the password and login to your database. Some scripts are timing out, but I'm still testing. Will be back here. --Mark 04:15, 11 December 2009 (UTC)
Refresh Links script times out in about a minute+. This is the message.
Refreshing links table.
Starting from page_id 0 of 13706.
0
100
200
300
400
500
600
700
800
900
1000
1100
1200
1300
1400
1500

--Mark 04:24, 11 December 2009 (UTC)

checkUserNames doesn't run at all.--Mark 08:14, 11 December 2009 (UTC)
Hi Mark - this extension is mostly just a wrapper, I can't really provide help on how to use the various scripts or even guarantee all scripts work correctly. I will look into checkusernames when I get a chance. --Frantik 11:03, 16 December 2009 (UTC)Reply

"Return to Maintenance Shell" bug

edit

On the "run script" page, there is a link to "Return to the Maintenance Shell". That link is busted...it points to "index.php&title=Special:MaintenanceShell". It should be a question mark instead of an ampersand before the "title" parameter. --Duke33 19:57, 16 December 2009 (UTC)Reply

thanks, this has been corrected for the next release --Frantik 00:15, 17 December 2009 (UTC)Reply


Recaptcha bug

edit

If Extension:reCAPTCHA is installed you get the following message when trying to run any maintanance script: "You need to set $recaptcha_private_key and $recaptcha_public_key in LocalSettings.php to use the reCAPTCHA plugin. You can sign up for a key here." Those lines are of course present and reCAPTCHA works fine everywhere else, so probably something about the way this script is calling others.

Is the command to load MaintenanceShell the VERY LAST line in LocalSettings.php?
#Place this on the VERY LAST line of your Localsettings.php file:
require_once("$IP/extensions/MaintenanceShell/MaintenanceShell.php");
I suspect you are setting the recapcha values after calling maintenanceshell... --Frantik 22:25, 24 January 2010 (UTC)Reply

Localisation for German

edit

Hi Frantik,

I have localised your extension into German with regard to MaintenanceShell.php.

 $messages['de'] = array( 
 	'maintenanceshell' => 'Wartungs-Shell',
 	'maintenanceshell-desc' => 'Erg&auml;nzt eine [[Special:MaintenanceShell|Spezialseite]] mit hilfreichen Links zu Wartungsskripten f&uuml;r die Systemadministration.',
 	'right-maintenanceshell' => 'Wartungsskripte über die Wartungs-Shell ausf&uuml;hren.',
 );

I would link to suggest as an enhancement that you make MaintenanceShell_body.php localisable as well. I have done the German localisation. In case you need it... :-)

Cheers and thank you for your good work. --kgh 23:18, 11 April 2010 (UTC)Reply

I agree.. this is a bad habit I have as a native english speaker.. :( I will address this in the next release (when i get a chance to release it) thanks for your help :) --Frantik 08:33, 17 April 2010 (UTC)Reply
No worries. The main thing is, that the extension is available. Since English is a standard, there is nothing wrong about providing an extension in English, especially with regard to site administrators. However, localised extensions spread more easily. Cheers --kgh 10:00, 17 April 2010 (UTC)Reply
You should be able to set all text now with 0.2.3 :) --Frantik 00:59, 8 May 2010 (UTC)Reply
That's great news! Thank you! I now provide the localisaton for ‚de‘ and ‚de-formal‘ as promised:
/** German (Deutsch)
 * @author kghbln
 */
$messages['de'] = array(
   'maintenanceshell'         => 'Wartungs-Shell',
   'maintenanceshell-desc'    => 'Erg&auml;nzt eine [[Special:MaintenanceShell|Spezialseite]] mit hilfreichen Links zu Wartungsskripten f&uuml;r die Systemadministration.',
   'maintshell-pagename'      => 'Special:Wartungs-Shell',
   'right-maintenanceshell'   => 'Wartungsskripte &uuml;ber die Wartungs-Shell ausf&uuml;hren.',
   'maintshell-installfail'   => "Das Benutzergruppenrecht <b>maintenanceshell</b>, das f&uuml;r die Verwendung der Wartungs-Shell ben&ouml;tigt wird, wurde keiner Benutzergruppe zugeordnet.<br /><br />Weitere Hinweise hierzu gibt es in der <a href='[[Extension:Maintenance]]Shell'>Dokumentation zur Wartungs-Shell</a>.",
   'maintshell-installfail2'  => "<b>Die Wartungs-Shell wurde fehlerhaft konfiguriert.</b><br />Das Benutzergruppenrecht <b>maintenanceshell</b> muss in der Datei <b>LocalSettings.php</b> einer Benutzergruppe zugewiesen werden, bevor dort die Softwareerweiterung Wartungs-Shell aufgerufen wird.<br /><br />Weitere Hinweise hierzu gibt es in der <a href='[[Extension:Maintenance]]Shell'>Dokumentation zur Wartungs-Shell</a>.",
   'maintshell-installfail3'  => 'Um die Wartungs-Shell zu aktivieren, muss folgender Code in der <b>allerletzten Zeile</b> der Datei <b>LocalSettings.php</b> eingef&uuml;gt werden:</br />require_once( "$IP/extensions/MaintenanceShell/MaintenanceShell.php" );',
   'maintshell-return'        => 'R&uuml;ckkehr zur Wartungs-Shell',
   'maintshell-noexist'       => "Das Skript '$1' ist nicht vorhanden!",
   'maintshell-warning'       => '<b><u>Achtung:</u> Setze diese Skripte sorgf&auml;ltig ein. Dies wird zudem nur Systemadministratoren und fortgeschrittenen Nutzern empfohlen.</b>',
   'maintshell-links'         => '<ul style="padding-top:1em">
			            <li><a class="external" href="http://www.mediawiki.org/wiki/Manual:Maintenance_scripts">Nutzeranleitung f&uuml;r die Wartungs-Shell (englisch)</a></li>
				    <li><a class="external" href="[[Extension:Maintenance]]Shell">Hompage zur Wartungs-Shell (englisch) </a></li>
				  </ul><br />',
   'maintshell-available'     => '<br /><b>Verf&uuml;gbare Wartungsskripte:</b>',
   'maintshell-scriptname'    => 'Name des Skrips',
   'maintshell-commandline'   => 'Zus&auml;tzliche Kommandos',
   'maintshell-runscript'     => 'Skript ausf&uuml;hren',
);

/** German (formal address) (Deutsch (Sie-Form))
 * @author kghbln
 */
$messages['de-formal'] = array(
'maintshell-warning'       => '<b><u>Achtung:</u> Setzen Sie diese Skripte sorgf&auml;ltig ein. Dies wird zudem nur Systemadministratoren und fortgeschrittenen Nutzern empfohlen.</b>',
);
Please copy it from the edit page due to the Germanic umlauts. Did you ever think of getting you extensions to SVN? Thus the localisation files would be automatically provided to „translate.net“ which would very much increase the chance of further localisations. --kgh 12:28, 8 May 2010 (UTC)Reply
Awesome, I will include this in the release. I've been meaning to get an SVN account to add extensions.. this will probably be the motivation I need --Frantik 18:48, 8 May 2010 (UTC)Reply
Your welcome. I hope to see it on SVN :) --kgh 23:58, 8 May 2010 (UTC)Reply
Great.. I added your contribution to the release and have also submitted my request for SVN access. Cheers --Frantik 02:41, 9 May 2010 (UTC)Reply
:-) Wonderful news. However, there is on thing about SVN. I do not think, that it is possible to see how many use or at least downloaded the extension. I hope you do not have second thoughts now. On the other hand extensions on SVN may be regarded much higher in status. Cheers --kgh 08:35, 9 May 2010 (UTC)Reply
Yes that one one reason I like to keep the files on my server, so I can keep track of the # of downloads. But as you say, SVN extensions are regarded more highly.. plus it's easier for people to install i believe. --22:15, 9 May 2010 (UTC)
I think, if you keep on offering the package for download, as you do now, you will still be getting most of them. --kgh 10:16, 10 May 2010 (UTC)Reply

Hi, there. Does any one other besides me, get errors on using this xtension with de- or de-formal-localisation? On mouse-over on a link, i can see a mix of english an german. For example hovering on chekSyntax i'll get ...title=Special-Wartungs-Shell&script... which drops an error on clicking. Kind Regards, [[1]]

To make this work you also need to localize the file MaintenanceShell.alias.php. Add the following lines, then it should work:
$aliases['de'] = array(
    'MaintenanceShell' => array( 'Wartungs-Shell' ),
);
--W.stoettinger 09:37, 28 April 2011 (UTC)Reply

problem with latest mediawiki

edit

MaintenanceShell's last version doesn't work with mediawiki's last dump. 90.25.28.52 09:43, 17 May 2010 (UTC)Reply

Well, in fact, no version of MaintenanceShell works with mediawiki's last dump.

Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /extensions/MaintenanceShell/MaintenanceShell.php on line 142
thanks.. though i'm pretty sure I added that code in last two versions of MaintenanceShell. The last version in 2009 should work fine. What version of Mediawiki specifically are you using? --Frantik 13:03, 18 May 2010 (UTC)Reply
I looked into it more.. it's kind of strange that $messages isn't an array.. it means the language file hasn't been loaded, which is unlikely considering there is a line loading the script which defines $messages as an array --Frantik 13:10, 18 May 2010 (UTC)Reply
Also, do you get any script output? or just the warning message? For some reason I'm experiencing no output on one site out of 3, and i had to change ob_start(); to ob_start(); ob_start(); .. it might be due to a bug in a certain version of PHP or something so please provide your php version number as well. thanks --Frantik 14:55, 18 May 2010 (UTC)Reply

Hello, I am getting the same with my installation of the extension. I used the laest version of the extension and i still get this warning messages when i acces to my media wiki. does some budy have a solution ?????

what version of Mediawiki and MaintenanceShell are you using? --Frantik 09:38, 27 May 2010 (UTC)Reply

Maintenance Shell on SVN

edit

This is no longer an issue as the code on SVN has been removed until I have commit access --Frantik 18:15, 23 May 2010 (UTC)Reply

I have no control over the code at SVN at this time. This extension was added there by User:Devunt. Unfortunately s/he did not contact me before hand, so that version is effectively a fork.

--Frantik 11:17, 23 May 2010 (UTC)Reply

Extensions hosted at the Wikimedia SVN repository have the benefits of translations via translatewiki and better chances to be taken into account when changes to core affecting extensions are considered. Devunt should have really contacted you first but please remember that it's a free software and GPL allowed him to do so. If you don't mind to continue development on our SVN server, please apply for access here, otherwise we could mark out copy as fork. Max Semenik 11:51, 23 May 2010 (UTC)Reply
I requested access a week or two ago, so I'm just waiting on a response. Until then, I have no control over the code. I have no idea what changes were made before it was committed, and I can see that changes were made after it was committed. As you say, this is free software under the GNU GPL, but as the preamble to that license states: GPL requires that modified versions be marked as changed.
This event certainly does make me think twice about using GNU GPL again though.. i mean I want people to have it for free and don't care if people distribute the source. I was planning on committing my own version to the MW SVN as soon as I had write access, but now there is some other version there with my name on it but no indication that I have no control over any of changes that have been made.
--Frantik 12:22, 23 May 2010 (UTC)Reply

Register warning

edit

Question: with MaintenanceShell 3.0 (downloaded from [2]) on MediaWiki 1.15 I get "Warning: register_shutdown_function() [function.register-shutdown-function]: Invalid shutdown callback 'exit_callback' passed in /mediawiki/extensions/MaintenanceShell/MaintenanceShell.php on line 199". MS is definitely invoked on the last line of my LocalSettings. Any ideas? IsambardBrunel 12:12, 30 May 2010 (UTC)Reply

Hm I moved where that function is defined.. i guess I'll need to move it back. This is a very minor error though and will not affect the usability of the script. --Frantik 23:16, 31 May 2010 (UTC)Reply
Same issue here. FYI I am using MW 1.16B2. Not sure which version you made the change so instead of diff manually I'll wait for an update :) Can't wait to try out this extension though! - Gomeztogo 21:05, 2 June 2010 (UTC)Reply
This should not affect the ability of the script to function, though I will update it soon. You can still use it and just ignore the warning. --Frantik 12:04, 3 June 2010 (UTC)Reply
Unfortunately the warning does not include an option to ignore the error. - Gomeztogo 21:36, 3 June 2010 (UTC)Reply
A warning should not halt script execution. There might be another problem though if you're not seeing any other output. I will release an update in the next few days. You could try with an older version of MaintenanceShell but they have security issues so you should not leave it installed on your system after testing. --Frantik 02:21, 4 June 2010 (UTC)Reply
Version 0.3.1 fixes this problem --Frantik 11:59, 6 June 2010 (UTC)Reply

Mediawiki 1.16 users, please let me know your experience with MaintenanceShell

edit

I've heard reports that MaintenanceShell sometimes doesn't work right with 1.16; If this is true for you, please let me know the symptoms of the problem and also the version of MaintenanceShell, Mediawiki and PHP you are using. You can get this info from the Special:Version page on your wiki. Thanks --Frantik 12:01, 6 June 2010 (UTC)Reply

This extension is problematic with 1.16. Running any of the scripts returns this:
"Warning:  register_shutdown_function() [function.register-shutdown-function]: Invalid shutdown callback 'exit_callback' passed in ...\extensions\MaintenanceShell\MaintenanceShell.php on line 199"
Some other scripts seem to work OK, though again that error pops up everytime.
However, deleteOldrevisions (for one) does not work. Here is the error:
Limiting to `mwiki_page`.page_id IN ()
Searching for active revisions...
A database query syntax error has occurred.
The last attempted database query was:
"SELECT page_latest FROM `mwiki_page` WHERE page_id IN ()"
from within function "".
Database returned error "1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 (xxxxx)"
I'd love a working version of this extension, as my host doesn't allow shell/command line access.
PHP 5.2.10, MW 1.16.0beta2, MaintenanceShell 0.3.0
-- DoubleSuitedChris 20:10, 14 June 2010 (UTC)Reply
Got rid of the warning by downloading .3.1. Didn't realize there was a new one! Otherwise, same problem with the DOR script.
Glad to hear that is working properly for the most part. Some of the individual scripts might not work but it's not the fault of the shell, at least in the case of the DOR script you are running based on the error message. Thanks for providing feedback --Frantik 20:35, 14 June 2010 (UTC)Reply
Any suggestions on what I might try to get deleteOldRevisions working? I am only just a tad above novice when it comes to both PHP and mySQL. -- DoubleSuitedChris 21:02, 14 June 2010 (UTC)Reply
Unfortunately I don't have any suggestions.. the deleteOldrevisions script itself might be outdated.. --Frantik 09:01, 15 June 2010 (UTC)Reply

MaintenanceShell.0.3.1 fails, if you use a different language then english

edit

If you click on one of the hyperlink, the specialpage is not found.

e.g. changepassword

....index.php?title=Special:MaintenanceShell&script=changePassword <-- works
....index.php?title=Special:Wartungs-Shell&script=changePassword <-- doesnt work
                            ^^^^^^^^^^^^^^
Can you change line 37 of MaintenanceShell.i18n.php from
   'maintshell-pagename'      => 'Special:Wartungs-Shell',

to

   'maintshell-pagename'      => 'Special:MaintenanceShell',
and let me know if it works?--Frantik 00:40, 12 June 2010 (UTC)Reply
I also had to change line 35 from --80.153.6.24 08:40, 2 December 2010 (UTC)Reply
   'maintenanceshell'         => 'Wartungs-Shell',

to

   'maintenanceshell'         => 'MaintenanceShell',


The correct way to do this, is to localize the file MaintenanceShell.alias.php. Add the following lines, then it should work:
$aliases['de'] = array(
    'MaintenanceShell' => array( 'Wartungs-Shell' ),
);

--W.stoettinger 09:41, 28 April 2011 (UTC)Reply

Make sure not to copy MaintenanceShell dir to maintenance dir but to extensions dir

edit

This can help avoid PHP Warning and Fatal error, such as in the following example:

Warning: require_once(/home/*somedomain*/public_html/en/w/extensions/MaintenanceShell/MaintenanceShell.php)
[function.require-once]: failed to open stream:
No such file or directory in
/home/*somedomain*/public_html/en/w/LocalSettings.php on line 150

Fatal error: require_once() [function.require]: Failed opening required
'/home/*somedomain*/public_html/en/w/extensions/MaintenanceShell/MaintenanceShell.php'
(include_path='/home/*somedomain*/public_html/en/w:
/home/*somedomain*/public_html/en/w/includes:
/home/*somedomain*/public_html/en/w/languages:
.:
/usr/lib/php:/usr/local/lib/php')
in /home/*somedomain*/public_html/en/w/LocalSettings.php on line 150

This may be of some help for someone, who install extensions for the first time. 8-) ProSvet 15:48, 13 June 2010 (UTC)Reply

last dump

edit

Nothing works with mediawiki's last dump. For all versions, there is only a blank page.

what version of MW is the "last dump" ? I'm not planning on addressing 1.16 until it is out of beta. Apparently in 1.16 there is a safer way to call maintenance scripts so it may require a total rewrite anyways. --Frantik 11:02, 24 June 2010 (UTC)Reply

All the pages of the wiki are blank with mediawiki 1.17alpha. 92.158.200.243 14:28, 25 July 2010 (UTC)Reply

Thanks.. 1.16 isn't supported yet so 1.17 is really not supported! --Frantik 04:05, 28 July 2010 (UTC)Reply

1.16

edit

I am not encountering any errors, but attempting to run any script results in a blank result (nothing happens). This is 1.16b3 and 0.3.1. Thorncrag 20:59, 13 July 2010 (UTC)Reply

Thanks for your feedback. Can you provide more details? Do you get a blank page with nothing at all in it? Does it display the black box with green text, but then you see no output of the script? Thanks --Frantik 11:11, 14 July 2010 (UTC)Reply
That's correct, the "terminal" appears but nothing else happens, no output. This may be something misconfigured on my end, I know, but it was working prior to upgrading to 1.16. Is there something else I can do to get you more helpful info? Thorncrag 20:32, 14 July 2010 (UTC)Reply
Thanks.. this seems to be some problem with output buffering.. the script gets run but it's not displaying any output. I will look into it --Frantik 22:27, 17 July 2010 (UTC)Reply
Hey Frantik-- I can't actually verify that the scripts are being run. The few tests that I've conducted have not shown to have resulted in the expected result of running the script (e.g. refreshlinks). I will keep testing and let you know what I find (eventually!). Thorncrag 18:55, 18 August 2010 (UTC)Reply
yeah, now that 1.16 is out of beta i actually have to look into this lol :\ --Frantik 23:25, 18 August 2010 (UTC)Reply

Solution for 1.16

edit

Please see this section on the extension page and let me know if this solves problems many have reported with 1.16: Extension:MaintenanceShell#Errors_with_Mediawiki_1.16 --Frantik 10:28, 23 August 2010 (UTC)Reply

I am having issues with deleteRevision.php since upgrading to 1.16. Just putting the #### of the page is returning a 500 server error, however, I can use the maintenance extension with the limited number of scripts, one of which is deleteRevision.php and it works fine deleting a revision without an error. I did try your fix. Not sure what is going on. Any suggestions? Hutchy68 13:06, 3 September 2010 (UTC)Reply
Sorry, I can't offer help with individual maintenance scripts. I'm also confused, you said deleteRevision.php works and then you say it doesn't? --Frantik 02:24, 4 September 2010 (UTC)Reply

What should we see?

edit

What should we see when we run a script? For example when I run a script I just see

/home/public_html/wiki/maintenance$ php purgeOldText.php 

In a black box in green text, should I see anything else? Thanks --173.31.230.116 22:37, 29 March 2011 (UTC)Reply

That's the expected behavior, depending on the maintenance script. Some require parameters to do something useful, and some are more verbose than others (see screenshot). --Nakohdo 13:47, 1 April 2011 (UTC)Reply
 


that's not what I see. I wouldn't get the output of the maintenance script although I followed the instructions for MediaWiki 1.16 and added php_value register_argc_argv 1 in my .htaccess file (I don't have access to php.ini on my server). --W.stoettinger 09:50, 28 April 2011 (UTC)Reply
I had the same issue, until I figured out you have to use the full path:
Example: In the “Script name:” field, type in in “importImages”
In the “Command line options:” field,
/home/XXXXXX/public_html/Upload_Temp (EXTENSION) --user=UserName --skip-dupes
  • Upload_Temp = Where the current location of the files to import are.
Username must be typed in exactly as it appears on the top of the page
  • Example: /home/XXXXX/public_html/Upload_Temp PDF --user=Lynxcub --skip-dupes
Click the “Run script” button.
If successful, you should get a black box full of green text


I made no changed to the .http or php.ini, as i'm on a shared hosted server.
My LocalSettings.php settings are
  • $wgMaintenanceShellDir = "$IP/maintenance/"; (Middle of file)
  • require_once("$IP/extensions/MaintenanceShell/MaintenanceShell.php"); (Very last line)
MW=1.16.2
Lynxcub 16:10, 28 April 2011 (UTC)Reply

MW 1.17??

edit

Is there, or will there be an update to allow MW 1.17.0 (official) to work with this extension. Currently when I try to use it, I get to the page where you can select what script to run, but when I go to the script, it appears to execute, but does nothing

example

get the box that indicates the script is running, but all I see is this /home/XXXXXX/public_html/maintenance$ php /home/XXXXXX/public_html/maintenance/updateSearchIndex.php or /home/XXXXXX/public_html/maintenance$ php /home/XXXXXX/public_html/maintenance/update.php
Lynxcub 17:09, 12 July 2011 (UTC)Reply

Lynxcub, I'm working with mw1.17 too and have the same problem. What's interesting though is that the 'importImages.php' maintinence script work fine, but 'update.php' and 'show/runJobs.php' does not. So it seems like it might be just some simple tweak. Further experimenting shows that the other Maintenance extension (Extension:Maintenance) seems to work flawlessly with mw1.17 - hmf... should be an easy fix if we can get the authors (SwiftlyTilting (FrantikTalk)) to look into it. Please report back here if you have any hacks or work-arounds and I'll do the same. Good luck! - --Rkevans 15:15, 16 July 2011 (UTC)

adding the lines to local settings crashes my wiki

edit

I skimmed this page and I didn't see anybody actually completely crashing their page by adding the lines for this extension to their local settings, like it does for me.

HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.

I need shell access to stop letting spam bots start accounts just like a lot of people...

I have version 1.16.2 of media wiki, 5.2.17 of php, and 3.1 of MaintenanceShell.

I have a good handful of other extensions running, could one of those be interfering and I should disable it briefly...?

Any help would be awesome, thanks.

Couple things. 1) did you run the update.php, this has helped a couple of people. 2) About disabling to test conflict, its always a good idea, and test, then add them back in, one at a time. Lynxcub 15:42, 21 September 2011 (UTC)

Nothing happens

edit

Working with MW 1.16.5 on an Apache Server (WIN).

When I type "update" and try to execute the script, nothing happens. The browser doesn't change and returns to the Maintenance Shell window after a few seconds. There is no black screen.

When I type "1" (to execute 1.php, which doesn't exist) I get the same reaction - nothing.

Is there a logfile to check why the script is not found?

How can I check if I have enough rights to execute the scripts?

Unfortunately I cannot access the server via putty or another terminal program. Therefore I have installed PHPshell. When I try to execute the script there I get the message "Could not open input file: update.php". When I try to execute "1.php" (which does not exist) I get the same message.

Has anyone an idea?


Quick Q
In PHP Shell did you enter the absolute path to 1.php? eg. "php C:\xampp\htdocs\mediawiki\1.php" ?

LocalSetting.php

edit

How to set LocalSetting.php in MaintenanceShell? --Kolega2357 (talk) 01:07, 27 December 2012 (UTC)Reply

I'm not sure what you mean. Installation instructions for LocalSettings are found on the extension page. If you intend to edit the LocalSettings file itself you are mistaken. The MaintenanceShell extension is designed to run maintenance scripts (see Manual:Maintenance scripts) by simulating a shell. To set configuration of LocalSettings, you'll have to edit that file. Even on limited web hosts with no shell access you'll be able to edit files. Otherwise, you wouldn't be able to install this extension either. Krinkle (talk) 19:30, 20 May 2013 (UTC)Reply

JavaScript enabled but not working

edit

hi there seems to be a bug in Extension:MaintenanceShell because it keeps saying this extension requires javascript for security reason but I have it enabled please fix it Paladox2014 (talk) 18:35, 15 May 2013 (UTC)Reply

You'll have to provide more details than that. It worked for me last I tried. Check the browser javascript console for errors (Chrome Developer Tools' Console, for example). Krinkle (talk) 18:46, 15 May 2013 (UTC)Reply
should i upload a photo to show you 93.93.218.196 12:19, 16 May 2013 (UTC)Reply
here is the error it says in the chrome JavaScript console Uncaught SyntaxError: Unexpected token < load.php:24

86.171.33.224 20:48, 16 May 2013 (UTC)Reply

No photo screenshot needed. The error (Uncaught SyntaxError: Unexpected token < load.php:24) indicates that your wiki is having a server problem, reported through an error page in html (likely unrelated to the MaintenanceShell extension). Check Manual:How to debug and find out what the error is. You can also inspect the load.php request in your web browser (example). Krinkle (talk) 19:23, 20 May 2013 (UTC)Reply
ive tried the debug but woulden show any error how would I fix my wiki server 90.214.166.145 15:13, 22 May 2013 (UTC)Reply
I ran into this issue and resolved it by deleting everything in the /cache folder. No errors were being thrown but it seems the js for the extension wasn't getting compiled by the resourceloader (or however it's being included). --174.119.254.138 02:06, 23 October 2013 (UTC)Reply
I have the same issue and it's definitively a server /LocalSettings issue.
I'm using a shared webhosting server and have usually $wgServer pointed to my to the domain the wiki is to be accessed from. This leads to the strange fact that all skins beside the one defined in $wgDefaultSkin are not displayed correctly. However to avoid the JavaScript message in MaintenanceShell I temporarily change my $wgServer setting to the absolute path where the wiki is located on the shared web hosting server and access my wiki via the absolute path of the shared webhoster, not the domain. Then any script can be run without that message. Not pretty, but it works. CayceP (talk) 15:45, 5 February 2014 (UTC)Reply

populateSitesTable

edit

hi please add populateSitesTable.php maintenance script please 86.168.53.89 11:44, 28 May 2013 (UTC)Reply

The MaintenanceShell extension doesn't have a maintenance script registry that requires "adding" scripts to it. It provides whatever i finds in the maintenance script directory of your MediaWiki install. As documented, you can use $wgMaintenanceShellPath to use a different directory to list maintenance scripts from.
MediaWiki has no script named "populateSitesTable.php", so assuming you mean the equally-named script from the "Wikibase" extension, set $wgMaintenanceShellPath to the maintenance directory in your install of Wikibase. Krinkle (talk) 12:19, 28 May 2013 (UTC)Reply
ok how do I use $wgMaintenanceShellPath to find populateSitesTable.php in wikibase 86.168.53.89 12:23, 28 May 2013 (UTC)Reply
First off, I'd like to give you a gentle warning that if my previous instructions were not clear enough, I believe it may not be wise for you to manage a wiki at this time. However to elaborate:
Ensure you followed the installation instructions, then edit your LocalSettings.php and add the following after the require_once for MaintenanceShell.php:
$wgMaintenanceShellPath = "$IP/extensions/Wikibase/lib/maintenance/populateSitesTable.php";

You may need to adjust the path if you installed Wikibase in a different directory. Then revisit Special:MaintenanceShell and the Wikibase scripts should be listed. Krinkle (talk) 13:02, 28 May 2013 (UTC)Reply
ok ive done that and it says Warning: array_map(): Argument #2 should be an array in /home/u625671279/public_html/extensions/MaintenanceShell/includes/SpecialMaintenanceShell.php on line 31
Warning: array_combine() expects parameter 1 to be array, null given in /home/u625671279/public_html/extensions/MaintenanceShell/includes/SpecialMaintenanceShell.php on line 32

so how would I fix that eerror 86.168.53.89 14:26, 28 May 2013 (UTC)Reply

This means you pointed $wgMaintenanceShellPath to a directory that doesn't exist or is empty. Krinkle (talk) 14:28, 28 May 2013 (UTC)Reply
ok but the directory does exsit because it is in the :
$wgMaintenanceShellPath = "$IP/extensions/Wikibase/lib/maintenance/populateSitesTable.php";
31.55.3.56 14:41, 28 May 2013 (UTC)Reply
$wgMaintenanceShellPath needs to be set to the maintenance/ directory, not the file inside it. The interface will list the files inside and you can select it from there. Krinkle (talk) 16:05, 7 June 2013 (UTC)Reply

Problem - closed page by accident and now won't load

edit

Hi,

I installed this and was running DeleteArchivedRevisions.php on it when I accidentally closed the window while it was still running. Now, I cannot access my mediawiki site - it just says connecting and then I eventually get information that the connection was reset. Is this because the extension is still running? How can I resolve this? Thanks for any help!

Experience on mediawiki 1.21?

edit

I'm using 1.21 (soon to be 1.22) and php 5.4. When I run the scripts with --help I can see the help output, but actually running the scrips returns no output. I've tried a number of different scripts, all with the same result. UPDATE: actually it seems that the scripts work silently. --Frug (talk) 15:51, 28 October 2013 (UTC)Reply

MaintenanceShell error in mediawiki

edit

hi I get this error in MaintenanceShell

Notice: Did not find alias for special page 'MaintenanceShell'. Perhaps no aliases are defined for it? [Called from SpecialPageFactory::getLocalNameFor in /home/paladox/public_html/en/includes/specialpage/SpecialPageFactory.php at line 569] in /home/paladox/public_html/en/includes/debug/Debug.php on line 301

Notice: Did not find alias for special page 'MaintenanceShell'. Perhaps no aliases are defined for it? [Called from SpecialPageFactory::getLocalNameFor in /home/paladox/public_html/en/includes/specialpage/SpecialPageFactory.php at line 569] in /home/paladox/public_html/en/includes/debug/Debug.php on line 301

I am running mediawiki 1.23 wmf 12 and please also fix an issue on web hosts that do not support ssh and have disabled it all please 90.195.251.120 18:46, 12 February 2014 (UTC)Reply

Return to "MaintenanceShell/Archive" page.