Jump to content

Topic on Project:Support desk

[RESOLVED] upgrade from 1.16.1 to 1.21.1 failing

8
Mickeyf~mediawikiwiki (talkcontribs)

I am struggling to upgrade from 1.16.1 to 1.21.1. This is a private wiki so I can't give a URL.

Before doing this I made a copy of the wiki on a local PC and upgraded all extensions until I had a correctly working 1.21.1 installation. I then copied the directory tree to the server as 'w.1.12.1', backed up my DB, renamed my 'w' to 'w.16.1', renamed 'w.1.12.1' to 'w', and edited my .htaccess files to disable mod_rewrite.

Attempting to upgrade via the web interface failed with a reference to iocube.so, which the hosting provider says they don't believe is the problem. After restoring my backed up DB, I asked them to run update.php for me, and this is what they got:

$ php /home/vigilhealth/www/www/w/maintenance/update.php A database error has occurred. Did you forget to run maintenance/update.php after upgrading? See: https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script Query: SELECT page_id,page_len,page_is_redirect,page_latest,page_content_model FROM `page` WHERE page_namespace = '10' AND page_title = 'Extension_DPL' LIMIT 1 Function: LinkCache::addLinkObj Error: 1054 Unknown column 'page_content_model' in 'field list' (localhost:/tmp/mysql5.sock)

I'm not sure where to go from here. Unless there was some unknown problem with the DB restore, this is the DB that was working correctly with 1.16.1, so why is update.php failing? (Yes, I am using DPL, but why should that be a page title?)

Any help appreciated.

This post was posted by Mickeyf~mediawikiwiki, but signed as Mickeyf.

Kchurch05 (talkcontribs)

I had a similar issue when upgrading ours from 1.16 to 1.21... I ended up having to delete all the old files and put in a fresh install. (Be sure to back up the images folder and restore that once you've finished installing. :) I was able to leave the old DB up (e.g., putting in those parameters when going through the setup) and it was able to populate it OK.

Mickeyf~mediawikiwiki (talkcontribs)

Well, this is ironic, considering how carefully I made certain everything worked on a test PC before trying it on the real server. I have now restored my DB from the system backup in case my own backup had any issues (it did not report any) and restored the 1.16.1 file tree, but I still now get "wiki_name has a problem Sorry! This site is experiencing technical difficulties". No indication whether this is a DB issue or some file is unhappy. Of course, both should be identical to what was working before I started.

I guess I'll try to do a fresh install and go from there. Did you mean a fresh install of 1.21 then just run update, or did you freshly install 1.16 (which matched your existing DB) and then try to run update?

thanks

This post was posted by Mickeyf~mediawikiwiki, but signed as Mickeyf.

Mickeyf~mediawikiwiki (talkcontribs)

I was able to get 1.16.1 working again by restoring the DB, and remembering to re-enable

AddHandler application/x-httpd-php52 .php

in my .htaccess, which was needed when the host made php 5.3 the default.

I have now restored my DB and started with a fresh set of 1.21.1 files, updated extensions, and my LocalSettings.php that worked with the local copy of 1.21.1 (edited to reflect the host mysql server, etc).

When I run update.php (or rather when my host provider runs it on the command line), I still get the error referencing "Unknown column 'page_content_model' "

My host is about to discontinue support for php 5.2, so we cannot continue to use mw 1.16.

Does the updater care about extensions? I was under the impression that it merely updated the DB structure. If so, why should it fail to update a working 1.16.1 DB?

Any help out there?

This post was posted by Mickeyf~mediawikiwiki, but signed as Mickeyf.

Mickeyf~mediawikiwiki (talkcontribs)

With great relief I am reporting that a complete new set of 1.21.1 files, and running update.php as a cron job (with "#!/usr/local/bin/php.cli" added as the first line) finally allowed me to arrive at a working 1.21.1. Why update.php would have failed when the host support personnel ran it from the command line I have no idea. I did disable DPL and re-enable it afterwards, but I'm skeptical that this had anything to do with it.

This post was posted by Mickeyf~mediawikiwiki, but signed as Mickeyf.

78.21.3.76 (talkcontribs)

I had the same problem. DPL had nothing to do with it, it's just one of the first queries that uses the page table. If you disable DPL, the error occurs with just another page_title because that column does not exist.

I solved it with a very dirty work-around. I added the column "page_content_model" myself as text in phpmyadmin. I ran the update.php and during the 5 seconds countdown. I removed the "page_content_model". The update.php than updates the page table itself.

78.21.3.76 (talkcontribs)
183.89.118.77 (talkcontribs)

Thank you! It helped a lot. I got it done via web updater.

Reply to "[RESOLVED] upgrade from 1.16.1 to 1.21.1 failing"