* [gentoo-user] Problem upgrading mediawiki @ 2006-12-31 17:20 Enrico Weigelt 2006-12-31 17:28 ` [gentoo-user] " Enrico Weigelt ` (2 more replies) 0 siblings, 3 replies; 10+ messages in thread From: Enrico Weigelt @ 2006-12-31 17:20 UTC (permalink / raw To: gentoo-user Hi folks, I just tried to upgrade some wikis from 1.4.15 (to 1.5.8, 1.6.8, 1.7.1) and ran into trouble: while trying access the wiki, I get an query error - seems the database layout has changed. How can I update it ? thx -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-user] Re: Problem upgrading mediawiki 2006-12-31 17:20 [gentoo-user] Problem upgrading mediawiki Enrico Weigelt @ 2006-12-31 17:28 ` Enrico Weigelt 2007-01-01 2:24 ` [gentoo-user] " Boyd Stephen Smith Jr. 2007-01-01 8:56 ` Jigme Datse 2 siblings, 0 replies; 10+ messages in thread From: Enrico Weigelt @ 2006-12-31 17:28 UTC (permalink / raw To: gentoo-user * Enrico Weigelt <weigelt@metux.de> wrote: Hi, > I just tried to upgrade some wikis from 1.4.15 (to 1.5.8, 1.6.8, > 1.7.1) and ran into trouble: while trying access the wiki, I > get an query error - seems the database layout has changed. Another wiki, 1.5.8, makes trouble when trying to upgrade to 1.6.8 and 1.7.1 as well: # Fatal error: Call to a member function getLatest() on a non-object in # /var/www/gez-widerstand.metux.de/htdocs/includes/SkinTemplate.php on line 804 cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Problem upgrading mediawiki 2006-12-31 17:20 [gentoo-user] Problem upgrading mediawiki Enrico Weigelt 2006-12-31 17:28 ` [gentoo-user] " Enrico Weigelt @ 2007-01-01 2:24 ` Boyd Stephen Smith Jr. 2007-01-01 8:56 ` Jigme Datse 2 siblings, 0 replies; 10+ messages in thread From: Boyd Stephen Smith Jr. @ 2007-01-01 2:24 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 1000 bytes --] On Sunday 31 December 2006 11:20, Enrico Weigelt <weigelt@metux.de> wrote about '[gentoo-user] Problem upgrading mediawiki': > I just tried to upgrade some wikis from 1.4.15 (to 1.5.8, 1.6.8, > 1.7.1) and ran into trouble: while trying access the wiki, I > get an query error - seems the database layout has changed. Yep, the database layout of MediaWiki changes with the minor version 1.4.x -> 1.5.x (etc.). > How can I update it ? I believe the MediaWiki developers generally provide update scripts [small downtime] and/or a way to export the data, delete the db, recreate the db, and import the data [large downtime]. AFAICT, this is a MediaWiki issue and not a Gentoo issue. You might get better responses using their support system instead. -- "If there's one thing we've established over the years, it's that the vast majority of our users don't have the slightest clue what's best for them in terms of package stability." -- Gentoo Developer Ciaran McCreesh [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Problem upgrading mediawiki 2006-12-31 17:20 [gentoo-user] Problem upgrading mediawiki Enrico Weigelt 2006-12-31 17:28 ` [gentoo-user] " Enrico Weigelt 2007-01-01 2:24 ` [gentoo-user] " Boyd Stephen Smith Jr. @ 2007-01-01 8:56 ` Jigme Datse 2007-01-01 17:48 ` Enrico Weigelt 2 siblings, 1 reply; 10+ messages in thread From: Jigme Datse @ 2007-01-01 8:56 UTC (permalink / raw To: gentoo-user, weigelt Enrico Weigelt wrote: > Hi folks, > > > I just tried to upgrade some wikis from 1.4.15 (to 1.5.8, 1.6.8, > 1.7.1) and ran into trouble: while trying access the wiki, I > get an query error - seems the database layout has changed. > > How can I update it ? I ran into a similar problem in one of my updates of it. I am currently running 1.68, and was running 1.4 and may have gone through the 1.5 series. There is documentation on the mediawiki site at http://www.mediawiki.org/wiki/Manual:Upgrading the key that I think you may be missing is the command: $ php update.php Though there are some things with that, such as files moving (I believe) so what looks like it should be simple there are two versions of files there, one in /var/www/ and one on /usr/share/webapps, and I can't tell you what the difference is, and which is needed for what, but I believe both are indeed needed. Please look at the mediawiki docs as I think they will give you what you need if this message hasn't. Jigme Datse -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Problem upgrading mediawiki 2007-01-01 8:56 ` Jigme Datse @ 2007-01-01 17:48 ` Enrico Weigelt 2007-01-02 15:31 ` kashani 2007-01-05 20:28 ` Enrico Weigelt 0 siblings, 2 replies; 10+ messages in thread From: Enrico Weigelt @ 2007-01-01 17:48 UTC (permalink / raw To: gentoo-user * Jigme Datse <jrasku@armispiansystems.ca> wrote: Hi, > I ran into a similar problem in one of my updates of it. I am currently > running 1.68, and was running 1.4 and may have gone through the 1.5 > series. There is documentation on the mediawiki site at > http://www.mediawiki.org/wiki/Manual:Upgrading the key that I think you > may be missing is the command: > > $ php update.php Of course I tried that, but didn't help. Some further research showed up: You need to copy LocalSettings.php to AdminSettings.php and add $wgDBadminuser+$wgDBadminpassword containing your DB's root login data there. BTW: I'm a little bit confused why it needs root privileges to add / change some tables. Isn't the database already owned by the wiki's user ? ... strange ... cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Problem upgrading mediawiki 2007-01-01 17:48 ` Enrico Weigelt @ 2007-01-02 15:31 ` kashani 2007-01-05 20:35 ` Enrico Weigelt 2007-01-05 20:28 ` Enrico Weigelt 1 sibling, 1 reply; 10+ messages in thread From: kashani @ 2007-01-02 15:31 UTC (permalink / raw To: gentoo-user Enrico Weigelt wrote: > BTW: I'm a little bit confused why it needs root privileges to > add / change some tables. Isn't the database already owned by the > wiki's user ? ... strange ... Some people prefer to give their webapps limited insert, update, and delete access and it's likely that Mediawiki's updates require alter, create, drop, and file access which might be why they say to use an account with root privileges. kashani -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Problem upgrading mediawiki 2007-01-02 15:31 ` kashani @ 2007-01-05 20:35 ` Enrico Weigelt 2007-01-05 21:41 ` Enrico Weigelt 0 siblings, 1 reply; 10+ messages in thread From: Enrico Weigelt @ 2007-01-05 20:35 UTC (permalink / raw To: gentoo-user * kashani <kashani-list@badapple.net> wrote: > Some people prefer to give their webapps limited insert, update, and > delete access and it's likely that Mediawiki's updates require alter, > create, drop, and file access which might be why they say to use an > account with root privileges. For larger (not web-only) applications I can understand giving several subsystems specific access via separate views. But for an monolithic web(-only)-app like mediawiki, its really useless. The worst damage an attacker can do is deleting or changing data, database ownership is not needed for that. Does anyone known some way (w/o crawling too deep in the code) for givinb mediawiki the ownership of the database and never ever require superuser privileges anymore ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Problem upgrading mediawiki 2007-01-05 20:35 ` Enrico Weigelt @ 2007-01-05 21:41 ` Enrico Weigelt 2007-01-06 21:20 ` Enrico Weigelt 0 siblings, 1 reply; 10+ messages in thread From: Enrico Weigelt @ 2007-01-05 21:41 UTC (permalink / raw To: gentoo-user * Enrico Weigelt <weigelt@metux.de> wrote: > Does anyone known some way (w/o crawling too deep in the code) > for givinb mediawiki the ownership of the database and never ever > require superuser privileges anymore ? Well, just found it out by myself: * log into you wiki database and give your wikiuser all permissions: GRANT ALL ON *.* TO $wikiuser@localhost ; * set $wgDBadminuser/$wgDBadminpassword to your normal wiki user in AdminSettings.php (you may copy it from LocalSettings.php) * run 'php update.php' cu PS: does anyone get mediawiki running on postgresql ? -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Problem upgrading mediawiki 2007-01-05 21:41 ` Enrico Weigelt @ 2007-01-06 21:20 ` Enrico Weigelt 0 siblings, 0 replies; 10+ messages in thread From: Enrico Weigelt @ 2007-01-06 21:20 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 682 bytes --] Okay folks, here's a little script for assisting wiki updates. It does not yet fix the database permissions, since I'm not yet shure how I like to pass the superuser login/passwd. (suggestions welcomed) cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- [-- Attachment #2: update-wiki --] [-- Type: text/plain, Size: 1966 bytes --] #!/usr/bin/php <?php // // Copyright 2006, Enrico Weigelt, metux IT service <weigelt@metux.de> // // This script may be redistributed under the terms of the GPL. // $WEBAPP="mediawiki"; $DBSUPERUSER_NAME="root"; $DBSUPERUSER_PASSWORD="pemnj92"; if (!$_SERVER{'argv'}[2]) die ("update-wiki: <hostname> <version>"); $HOSTNAME=$_SERVER{'argv'}[1]; $VERSION=$_SERVER{'argv'}[2]; $WWWROOT="/var/www/$HOSTNAME/htdocs"; $MNTDIR="$WWWROOT/maintenance/"; $LOCALSETTINGS="$WWWROOT/LocalSettings.php"; $ADMINSETTINGS="$WWWROOT/AdminSettings.php"; if (!@fopen($LOCALSETTINGS,"r")) die ( "missing LocalSettings.php - you have to configure it first" ); if (!@fopen($ADMINSETTINGS,"r")) { echo "missing AdminSettings.php ... creating it\n"; define('MEDIAWIKI',1); require_once($LOCALSETTINGS); $fp_in=fopen($LOCALSETTINGS,"r"); $fp_out=fopen($ADMINSETTINGS,"w"); while (!feof($fp_in)) { $line=fgets($fp_in,4096); if (trim($line)=='?>') { fputs($fp_out,'$wgDBadminuser="'.$wgDBuser."\";\n"); fputs($fp_out,'$wgDBadminpassword="'.$wgDBpassword."\";\n"); fputs($fp_out,"\n"); fputs($fp_out,$line); while (!feof($fp_in)) fputs($fp_out,fgets($fp_in,4096)); $gotend = true; } else fputs($fp_out,$line); } if (!$gotend) { fputs($fp_out,'$wgDBadminuser="'.$wgDBuser."\";\n"); fputs($fp_out,'$wgDBadminpassword="'.$wgDBpassword."\";\n"); } fclose($fp_in); fclose($fp_out); } print "Upgrading the webapp code (->webapp-config)\n"; if (passthru("webapp-config -U -h $HOSTNAME $WEBAPP $VERSION",$ret)||($ret==0)) print "Okay\n"; else die ( "webapp-config failed: $ret\n"); print "Now calling the update script\n"; print "If it cannot do certain structure changes (ie. creating tables),\n"; print "you have to give full db access to the wiki user\n"; print "\n"; if (passthru("cd $MNTDIR && php update.php",$res)||($res==0)) print "OKAY\n"; else die("ERROR\n"); ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Problem upgrading mediawiki 2007-01-01 17:48 ` Enrico Weigelt 2007-01-02 15:31 ` kashani @ 2007-01-05 20:28 ` Enrico Weigelt 1 sibling, 0 replies; 10+ messages in thread From: Enrico Weigelt @ 2007-01-05 20:28 UTC (permalink / raw To: gentoo-user * Enrico Weigelt <weigelt@metux.de> wrote: Another update issue: $wgDisableUploads has been replaced by $wgEnableUploads cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2007-01-06 22:09 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2006-12-31 17:20 [gentoo-user] Problem upgrading mediawiki Enrico Weigelt 2006-12-31 17:28 ` [gentoo-user] " Enrico Weigelt 2007-01-01 2:24 ` [gentoo-user] " Boyd Stephen Smith Jr. 2007-01-01 8:56 ` Jigme Datse 2007-01-01 17:48 ` Enrico Weigelt 2007-01-02 15:31 ` kashani 2007-01-05 20:35 ` Enrico Weigelt 2007-01-05 21:41 ` Enrico Weigelt 2007-01-06 21:20 ` Enrico Weigelt 2007-01-05 20:28 ` Enrico Weigelt
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox