Several maintenance scripts wish to use the URL of the server, but of course this is not available, as we are running a maintenance script: https://bugzilla.wikimedia.org/show_bug.cgi?id=18274 https://bugzilla.wikimedia.org/show_bug.cgi?id=18362 http://www.mediawiki.org/wiki/Manual:Wiki_family#Fix_for_Maintenance_Scripts
Would the solution be to officially say that if the user intends to use maintenance scripts, he should have something like https://bugzilla.wikimedia.org/show_bug.cgi?id=18274#c6 in LocalSettings.php?
Also maybe maintenance scripts should bomb out instead of guessing we meant http://localhost and hoping for the best.
jidanni@jidanni.org wrote:
Several maintenance scripts wish to use the URL of the server,
[...]
Would the solution be to officially say that if the user intends to use maintenance scripts, he should have something like https://bugzilla.wikimedia.org/show_bug.cgi?id=18274#c6 in LocalSettings.php?
Why not put the server URL into AdminSettings.php where all the other maintenance script info goes? No sense using LocalSettings.php for nothing.
Mike
Michael Daly michael.daly@kayakwiki.org writes:
Why not put the server URL into AdminSettings.php where all the other maintenance script info goes? No sense using LocalSettings.php for nothing.
Say, can I put the AdminSettings contents into LocalSettings and thus not need to maintain an extra file? It seems LocalSettings gets read anyway every time I fire up a maintenance script. I'll just do $wgDBadminuser=$wgDBuser='neurdsworth'; etc. and be done with it. P.S., No need to uncomment $wgEnableProfileInfo = false; in AdminSettings.sample, as it is the default.
jidanni@jidanni.org wrote:
Michael Daly michael.daly@kayakwiki.org writes:
Why not put the server URL into AdminSettings.php where all the other maintenance script info goes? No sense using LocalSettings.php for nothing.
Say, can I put the AdminSettings contents into LocalSettings and thus not need to maintain an extra file?
AdminSettings.php is a standalone file that contains very little. LocalSettings.php is part of a larger program (the whole wiki) and is dependent on other files.
Running a maintenance script does not require running the wiki.
Two different things, two different files.
BTW - since AdminSettings.php contains the DB user and password, it's not a bad idea to keep it hidden unless it's actually required. Rename it, move it to another directory, whatever - just don't leave it exposed to the web.
Mike
The script won't show everyone the DB credentials. The script simply assigns the variables. Nothing more.
Darren L. VanBuren ===================== http://oks.tumblr.com/
On Sat, May 2, 2009 at 10:45, Michael Daly michael.daly@kayakwiki.org wrote:
jidanni@jidanni.org wrote:
Michael Daly michael.daly@kayakwiki.org writes:
Why not put the server URL into AdminSettings.php where all the other maintenance script info goes? No sense using LocalSettings.php for nothing.
>
Say, can I put the AdminSettings contents into LocalSettings and thus not need to maintain an extra file?
AdminSettings.php is a standalone file that contains very little. LocalSettings.php is part of a larger program (the whole wiki) and is dependent on other files.
Running a maintenance script does not require running the wiki.
Two different things, two different files.
BTW - since AdminSettings.php contains the DB user and password, it's not a bad idea to keep it hidden unless it's actually required. Rename it, move it to another directory, whatever - just don't leave it exposed to the web.
Mike
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Darren VanBuren wrote:
The script won't show everyone the DB credentials. The script simply assigns the variables. Nothing more.
But you have to ensure that the web server doesn't serve up the AdminSettings file to anyone who wants to look. You also have to ensure that the web server isn't hacked to allow the file to be seen. Wild optimism doesn't make for secure systems.
Mike
Michael Daly michael.daly@kayakwiki.org writes:
Why not put the server URL into AdminSettings.php where all the other maintenance script info goes? No sense using LocalSettings.php for nothing.
I have taken the wild step of telling people the two files can be combined into one: http://www.mediawiki.org/wiki/Manual:AdminSettings.php#Merging_with_LocalSet... , wherein we can tell maintenance scripts our URL, http://www.mediawiki.org/wiki/Manual:Wiki_family#Ultimate_minimalist_solutio... .
jidanni@jidanni.org wrote:
I have taken the wild step of telling people the two files can be combined into one: http://www.mediawiki.org/wiki/Manual:AdminSettings.php#Merging_with_LocalSet... ,
If you're going to do that, why do you assume that there need only be one user? If you feel so strongly that AdminSettings.php is unnecessary, why not just eliminate it altogether and put both sets of ID info into LocalSettings.php without saying they have to be the same?
wherein we can tell maintenance scripts our URL, http://www.mediawiki.org/wiki/Manual:Wiki_family#Ultimate_minimalist_solutio... .
You've removed a generic example and replaced it with one that contains a bunch of hardcoded stuff that is specific to your wiki (it would appear) with no explanations. That isn't going to help anyone.
Mike
Michael Daly michael.daly@kayakwiki.org writes:
why not just eliminate it altogether and put both sets of ID info into LocalSettings.php without saying they have to be the same?
Yes, that's what http://www.mediawiki.org/wiki/Manual:AdminSettings.php#Merging_with_LocalSet... says.
You've removed a generic example and replaced it with one that contains a bunch of hardcoded stuff that is specific to your wiki (it would appear) with no explanations. That isn't going to help anyone.
OK, in http://www.mediawiki.org/wiki/Manual:Wiki_family#Ultimate_minimalist_solutio... I added: There is no generic example possible. Detecting what wiki the current web request or maintenance script is for all depends on how you have your filesystem configured. We can only give real life examples...
Even my previous version http://www.mediawiki.org/w/index.php?title=Manual:Wiki_family&oldid=2523... would backfire if one does $ cd ~/aaa/maintenance; php ~/bbb/maintenance/bla.php
jidanni@jidanni.org wrote:
Michael Daly michael.daly@kayakwiki.org writes:
why not just eliminate it altogether and put both sets of ID info into LocalSettings.php without saying they have to be the same?
Yes, that's what http://www.mediawiki.org/wiki/Manual:AdminSettings.php#Merging_with_LocalSet... says.
No, it says it they are the same, then the two can be merged:
<quote> If the separate user is not needed, you can just put the AdminSettings.php content into LocalSettings.php, </quote>
You can merge them without the two being the same:
$wgDBadminuser = 'someuser'; $wgDBadminpassword = 'somepsw'; $wgDBuser = 'nurdsome'; $wgDBpassword = 'tweedowitz';
You've removed a generic example and replaced it with one that contains a bunch of hardcoded stuff that is specific to your wiki (it would appear) with no explanations. That isn't going to help anyone.
OK, in http://www.mediawiki.org/wiki/Manual:Wiki_family#Ultimate_minimalist_solutio... I added: There is no generic example possible. Detecting what wiki the current web request or maintenance script is for all depends on how you have your filesystem configured. We can only give real life examples...
Take lessons on how to write documentation. Lots of people can do it.
Even my previous version http://www.mediawiki.org/w/index.php?title=Manual:Wiki_family&oldid=2523... would backfire if one does $ cd ~/aaa/maintenance; php ~/bbb/maintenance/bla.php
Only because you neglected to update that part of the page.
Mike
mediawiki-l@lists.wikimedia.org