Last modified: 2011-03-13 18:04:53 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T15230, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 13230 - Split web-based upgrade from install
Split web-based upgrade from install
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Installer (Other open bugs)
1.16.x
All All
: Lowest enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on: 20628
Blocks:
  Show dependency treegraph
 
Reported: 2008-03-03 01:00 UTC by Tim Starling
Modified: 2011-03-13 18:04 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Tim Starling 2008-03-03 01:00:58 UTC
Having a single script config/index.php do upgrades as well as installs may have seemed like a good idea at the time, but:

* It asks a whole lot of complicated questions and then ignores the answers
* It requires the user to delete or move away their LocalSettings.php
* Users who don't read the manual don't understand what they're meant to do, and try to run maintenance/update.php via PHPShell instead
* The code is mostly split into upgrade and install cases anyway

I suggest splitting a config/upgrade.php off from config/index.php. This new script would provide a short and simple form, asking for database username and password only.

Instead of requiring the user to delete their configuration to gain access, a dedicated lock file could be used. This lock file would be created on a successful install or upgrade, and deleted by the user to re-enable the upgrader. 

As for users who don't bother to read the manual: the database error page could link to config/upgrade.php. It could even check $wgVersion against a version number in the site_stats table, and display a welcome message!
Comment 1 Dan Jacobson 2009-05-31 00:33:13 UTC
The only documented upgrade procedure I can find is the one mentioned in
http://www.mediawiki.org/wiki/Manual:Upgrading

It does say "The preferred method of performing the update is using the
command-line maintenance script, although it is also possible to
re-run the web-based installer." But maybe that's not true anymore.

Actually what I'm hoping for is a cleaner way to
http://www.mediawiki.org/wiki/Manual:Wiki_family#Adding_new_wikis
without needing to remove a production ../LocalSettings.php .
Comment 2 Chad H. 2011-02-23 03:30:25 UTC
(In reply to comment #0)
> I suggest splitting a config/upgrade.php off from config/index.php. This new
> script would provide a short and simple form, asking for database username and
> password only.
>

Resolving this WONTFIX. The core suggestion, to split upgrade/install scripts won't be done, although a lot of the ideas in this bug are a part of the new installer. 

We no longer have to move LocalSettings, nor do we ask lots of extra questions in the upgrade case. For securing the web installer/updater, we use $wgUpgradeKey (which is random by default). Upgrade/Install classes are different codepaths, and only share a UI.

(In reply to comment #1)
> The only documented upgrade procedure I can find is the one mentioned in
> http://www.mediawiki.org/wiki/Manual:Upgrading
> 

That is the correct document. It needs updating for 1.17, filed bug 27650 for this.

> It does say "The preferred method of performing the update is using the
> command-line maintenance script, although it is also possible to
> re-run the web-based installer." But maybe that's not true anymore.
> 

You can do upgrades via the command line (as always) or via the web (with 1.17 and above). Docs will be updated to reflect this.

> Actually what I'm hoping for is a cleaner way to
> http://www.mediawiki.org/wiki/Manual:Wiki_family#Adding_new_wikis
> without needing to remove a production ../LocalSettings.php .

That has nothing to do with this bug.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links